mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +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:
committed by
Carlos R. Mafra
parent
e71f78f4fe
commit
027a720c17
24
src/wmspec.c
24
src/wmspec.c
@@ -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;
|
Atom type_ret;
|
||||||
int fmt_ret;
|
int fmt_ret, i;
|
||||||
unsigned long nitems_ret;
|
unsigned long nitems_ret, bytes_after_ret;
|
||||||
unsigned long bytes_after_ret;
|
|
||||||
long *data = NULL;
|
long *data = NULL;
|
||||||
Bool hasState = False;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_desktop, 0, 1, False,
|
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_desktop, 0, 1, False,
|
||||||
XA_CARDINAL, &type_ret, &fmt_ret, &nitems_ret,
|
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;
|
wwin->client_flags.omnipresent = 1;
|
||||||
else
|
else
|
||||||
*workspace = desktop;
|
*workspace = desktop;
|
||||||
|
|
||||||
hasState = True;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_state, 0, 1, False,
|
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) {
|
&bytes_after_ret, (unsigned char **)&data) == Success && data) {
|
||||||
|
|
||||||
Atom *state = (Atom *) 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);
|
doStateAtom(wwin, state[i], _NET_WM_STATE_ADD, True);
|
||||||
}
|
|
||||||
XFree(data);
|
XFree(data);
|
||||||
hasState = True;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (XGetWindowProperty(dpy, wwin->client_win, net_wm_window_type, 0, 1, False,
|
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;
|
break;
|
||||||
}
|
}
|
||||||
XFree(data);
|
XFree(data);
|
||||||
hasState = True;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wNETWMUpdateActions(wwin, False);
|
wNETWMUpdateActions(wwin, False);
|
||||||
updateStrut(wwin, False);
|
updateStrut(wwin, False);
|
||||||
if (updateStrut(wwin, True)) {
|
updateStrut(wwin, True);
|
||||||
hasState = True;
|
|
||||||
}
|
|
||||||
wScreenUpdateUsableArea(wwin->screen_ptr);
|
|
||||||
|
|
||||||
return hasState;
|
wScreenUpdateUsableArea(wwin->screen_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool updateNetIconInfo(WWindow * wwin)
|
static Bool updateNetIconInfo(WWindow * wwin)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ void wNETWMUpdateWorkarea(WScreen *scr, WArea usableArea);
|
|||||||
Bool wNETWMGetUsableArea(WScreen *scr, int head, WArea *area);
|
Bool wNETWMGetUsableArea(WScreen *scr, int head, WArea *area);
|
||||||
void wNETWMCheckInitialClientState(WWindow *wwin);
|
void wNETWMCheckInitialClientState(WWindow *wwin);
|
||||||
Bool wNETWMProcessClientMessage(XClientMessageEvent *event);
|
Bool wNETWMProcessClientMessage(XClientMessageEvent *event);
|
||||||
Bool wNETWMCheckClientHints(WWindow *wwin, int *layer, int *workspace);
|
void wNETWMCheckClientHints(WWindow *wwin, int *layer, int *workspace);
|
||||||
Bool wNETWMCheckClientHintChange(WWindow *wwin, XPropertyEvent *event);
|
Bool wNETWMCheckClientHintChange(WWindow *wwin, XPropertyEvent *event);
|
||||||
void wNETWMUpdateActions(WWindow *wwin, Bool del);
|
void wNETWMUpdateActions(WWindow *wwin, Bool del);
|
||||||
void wNETWMUpdateDesktop(WScreen *scr);
|
void wNETWMUpdateDesktop(WScreen *scr);
|
||||||
|
|||||||
Reference in New Issue
Block a user