mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Fixed some focus related problems when switching workspaces, including the
infamous problem with losing focus when switching to an empty workspace and back
This commit is contained in:
@@ -13,6 +13,8 @@ Changes since version 0.80.0:
|
||||
- Separated the font caches for normal fonts and fontsets in WINGs (they can
|
||||
have the same names and collide in the cache giving unwanted results)
|
||||
- Fixed Legal Panel not to display rectangles in place of new lines.
|
||||
- Fixed problem with losing focus when changing to an empty workspace and back.
|
||||
- Fixed another focus related problem when changing workspaces.
|
||||
|
||||
|
||||
Changes since version 0.70.0:
|
||||
|
||||
@@ -5,6 +5,7 @@ Changes since wmaker 0.80.0:
|
||||
- separated the font caches for normal fonts and fontsets in WINGs (they can
|
||||
have the same names and collide in the cache giving unwanted results)
|
||||
- fixed labels not to display '\n' as a character if multiple '\n' are passed
|
||||
but just skip to the next line.
|
||||
|
||||
|
||||
Changes since wmaker 0.70.0:
|
||||
|
||||
@@ -489,7 +489,8 @@ wWorkspaceForceChange(WScreen *scr, int workspace)
|
||||
wWorkspaceMenuUpdate(scr, scr->clip_ws_menu);
|
||||
|
||||
if ((tmp = scr->focused_window)!= NULL) {
|
||||
if ((IS_OMNIPRESENT(tmp) && !WFLAGP(tmp, skip_window_list))
|
||||
if ((IS_OMNIPRESENT(tmp) && (tmp->flags.mapped || tmp->flags.shaded)
|
||||
&& !WFLAGP(tmp, no_focusable))
|
||||
|| tmp->flags.changing_workspace) {
|
||||
foc = tmp;
|
||||
}
|
||||
@@ -523,7 +524,7 @@ wWorkspaceForceChange(WScreen *scr, int workspace)
|
||||
if (wapp) {
|
||||
wapp->last_workspace = workspace;
|
||||
}
|
||||
if (!foc2)
|
||||
if (!foc2 && (tmp->flags.mapped || tmp->flags.shaded))
|
||||
foc2 = tmp;
|
||||
}
|
||||
} else {
|
||||
@@ -538,7 +539,7 @@ wWorkspaceForceChange(WScreen *scr, int workspace)
|
||||
if (!(tmp->flags.mapped || tmp->flags.miniaturized)) {
|
||||
/* remap windows that are on this workspace */
|
||||
wWindowMap(tmp);
|
||||
if (!foc && !WFLAGP(tmp, skip_window_list))
|
||||
if (!foc && !WFLAGP(tmp, no_focusable))
|
||||
foc = tmp;
|
||||
}
|
||||
/* Also map miniwindow if not omnipresent */
|
||||
@@ -617,7 +618,8 @@ wWorkspaceForceChange(WScreen *scr, int workspace)
|
||||
* 2) Make pager.
|
||||
*/
|
||||
|
||||
void wWorkspaceManageEdge(WScreen *scr)
|
||||
void
|
||||
wWorkspaceManageEdge(WScreen *scr)
|
||||
{
|
||||
int w;
|
||||
int vmask;
|
||||
@@ -658,7 +660,8 @@ void wWorkspaceManageEdge(WScreen *scr)
|
||||
}
|
||||
}
|
||||
|
||||
void wWorkspaceRaiseEdge(WScreen *scr)
|
||||
void
|
||||
wWorkspaceRaiseEdge(WScreen *scr)
|
||||
{
|
||||
puts("raise edge");
|
||||
if (wPreferences.vedge_thickness && initVDesk) {
|
||||
@@ -669,7 +672,8 @@ void wWorkspaceRaiseEdge(WScreen *scr)
|
||||
}
|
||||
}
|
||||
|
||||
void wWorkspaceLowerEdge(WScreen *scr)
|
||||
void
|
||||
wWorkspaceLowerEdge(WScreen *scr)
|
||||
{
|
||||
puts("lower edge");
|
||||
if (wPreferences.vedge_thickness && initVDesk) {
|
||||
@@ -680,13 +684,16 @@ void wWorkspaceLowerEdge(WScreen *scr)
|
||||
}
|
||||
}
|
||||
|
||||
void wWorkspaceResizeViewPort(WScreen *scr, int workspace, int width, int height)
|
||||
void
|
||||
wWorkspaceResizeViewPort(WScreen *scr, int workspace, int width, int height)
|
||||
{
|
||||
scr->workspaces[workspace]->width = WMAX(width,scr->scr_width);
|
||||
scr->workspaces[workspace]->height = WMAX(height,scr->scr_height);
|
||||
}
|
||||
|
||||
void updateWorkspaceGeometry(WScreen *scr, int workspace, int *view_x, int *view_y) {
|
||||
void
|
||||
updateWorkspaceGeometry(WScreen *scr, int workspace, int *view_x, int *view_y)
|
||||
{
|
||||
int most_left, most_right, most_top, most_bottom;
|
||||
WWindow *wwin;
|
||||
|
||||
@@ -727,12 +734,16 @@ void updateWorkspaceGeometry(WScreen *scr, int workspace, int *view_x, int *view
|
||||
|
||||
}
|
||||
|
||||
|
||||
typedef struct _delay_configure {
|
||||
WWindow *wwin;
|
||||
int delay_count;
|
||||
} _delay_configure;
|
||||
|
||||
void _sendConfigureNotify (_delay_configure *delay) {
|
||||
|
||||
void
|
||||
sendConfigureNotify (_delay_configure *delay)
|
||||
{
|
||||
WWindow *wwin;
|
||||
|
||||
delay->delay_count--;
|
||||
@@ -743,7 +754,9 @@ void _sendConfigureNotify (_delay_configure *delay) {
|
||||
}
|
||||
}
|
||||
|
||||
Bool wWorkspaceSetViewPort(WScreen *scr, int workspace, int view_x, int view_y)
|
||||
|
||||
Bool
|
||||
wWorkspaceSetViewPort(WScreen *scr, int workspace, int view_x, int view_y)
|
||||
{
|
||||
Bool adjust_flag = False;
|
||||
int diff_x, diff_y;
|
||||
@@ -788,19 +801,23 @@ Bool wWorkspaceSetViewPort(WScreen *scr, int workspace, int view_x, int view_y)
|
||||
if (1) { /* if delay*/
|
||||
delay_configure.delay_count++;
|
||||
delay_configure.wwin = scr->focused_window;
|
||||
WMAddTimerHandler(200, (WMCallback *)_sendConfigureNotify, &delay_configure);
|
||||
WMAddTimerHandler(200, (WMCallback *)sendConfigureNotify, &delay_configure);
|
||||
}
|
||||
|
||||
return adjust_flag;
|
||||
}
|
||||
|
||||
void wWorkspaceGetViewPosition(WScreen *scr, int workspace, int *view_x, int *view_y) {
|
||||
|
||||
void
|
||||
wWorkspaceGetViewPosition(WScreen *scr, int workspace, int *view_x, int *view_y)
|
||||
{
|
||||
if (view_x) *view_x = scr->workspaces[workspace]->view_x;
|
||||
if (view_y) *view_y = scr->workspaces[workspace]->view_y;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static void
|
||||
switchWSCommand(WMenu *menu, WMenuEntry *entry)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user