1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

wmaker: Moved variable Ignore Wks Change into the workspace object in the global namespace

Took the opportunity to change its type: it was an integer, but it is
actually holding a yes/no status, so it is now defined as a boolean.
This commit is contained in:
Christophe CURIS
2013-10-10 20:38:22 +02:00
committed by Carlos R. Mafra
parent b6423a7b4f
commit c3c2d8d7f1
4 changed files with 14 additions and 10 deletions

View File

@@ -50,9 +50,6 @@
#include "misc.h"
#include "event.h"
/****** Global Variables ******/
int ignore_wks_change = 0;
static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x, int *new_y,
unsigned int *new_width, unsigned int *new_height);
@@ -1199,7 +1196,7 @@ void wIconifyWindow(WWindow * wwin)
void wDeiconifyWindow(WWindow *wwin)
{
/* Let's avoid changing workspace while deiconifying */
ignore_wks_change = 1;
w_global.workspace.ignore_change = True;
/* we're hiding for show_desktop */
int netwm_hidden = wwin->flags.net_show_desktop &&
@@ -1209,7 +1206,7 @@ void wDeiconifyWindow(WWindow *wwin)
wWindowChangeWorkspace(wwin, w_global.workspace.current);
if (!wwin->flags.miniaturized) {
ignore_wks_change = 0;
w_global.workspace.ignore_change = False;
return;
}
@@ -1220,7 +1217,7 @@ void wDeiconifyWindow(WWindow *wwin)
wDeiconifyWindow(owner);
wSetFocusTo(wwin->screen_ptr, wwin);
wRaiseFrame(wwin->frame->core);
ignore_wks_change = 0;
w_global.workspace.ignore_change = False;
return;
}
}
@@ -1309,7 +1306,7 @@ void wDeiconifyWindow(WWindow *wwin)
/* the window can disappear while ProcessPendingEvents() runs */
if (!wWindowFor(clientwin)) {
ignore_wks_change = 0;
w_global.workspace.ignore_change = False;
return;
}
}
@@ -1325,7 +1322,7 @@ void wDeiconifyWindow(WWindow *wwin)
if (!netwm_hidden)
wUnshadeWindow(wwin);
ignore_wks_change = 0;
w_global.workspace.ignore_change = False;
}
static void hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate)