1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

wNETWMCheckClientHints should be void

The function wNETWMCheckClientHints returns a Boolean, but
this value is never used, so can be removed.

This patch removes the boolean returned, the variable hasState,
and so some parts of the function changes.
The patch also moves some variable definition to the same line:
one type, one line.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-10-23 23:59:49 +02:00
committed by Carlos R. Mafra
parent e71f78f4fe
commit 027a720c17
2 changed files with 8 additions and 18 deletions

View File

@@ -1193,15 +1193,12 @@ static void updateWindowType(WWindow * wwin)
}
}
Bool wNETWMCheckClientHints(WWindow * wwin, int *layer, int *workspace)
void wNETWMCheckClientHints(WWindow *wwin, int *layer, int *workspace)
{
Atom type_ret;
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
int fmt_ret, i;
unsigned long nitems_ret, bytes_after_ret;
long *data = NULL;
Bool hasState = False;
int i;
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_desktop, 0, 1, False,
XA_CARDINAL, &type_ret, &fmt_ret, &nitems_ret,
@@ -1214,8 +1211,6 @@ Bool wNETWMCheckClientHints(WWindow * wwin, int *layer, int *workspace)
wwin->client_flags.omnipresent = 1;
else
*workspace = desktop;
hasState = True;
}
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_state, 0, 1, False,
@@ -1223,11 +1218,10 @@ Bool wNETWMCheckClientHints(WWindow * wwin, int *layer, int *workspace)
&bytes_after_ret, (unsigned char **)&data) == Success && data) {
Atom *state = (Atom *) data;
for (i = 0; i < nitems_ret; ++i) {
for (i = 0; i < nitems_ret; ++i)
doStateAtom(wwin, state[i], _NET_WM_STATE_ADD, True);
}
XFree(data);
hasState = True;
}
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_window_type, 0, 1, False,
@@ -1240,17 +1234,13 @@ Bool wNETWMCheckClientHints(WWindow * wwin, int *layer, int *workspace)
break;
}
XFree(data);
hasState = True;
}
wNETWMUpdateActions(wwin, False);
updateStrut(wwin, False);
if (updateStrut(wwin, True)) {
hasState = True;
}
wScreenUpdateUsableArea(wwin->screen_ptr);
updateStrut(wwin, True);
return hasState;
wScreenUpdateUsableArea(wwin->screen_ptr);
}
static Bool updateNetIconInfo(WWindow * wwin)