remove WMState

This commit is contained in:
Julien Danjou 2007-09-10 16:47:20 +02:00
parent 9485e7305c
commit 56b92a20b4
3 changed files with 5 additions and 4 deletions

View File

@ -96,7 +96,8 @@ getstate(Display *disp, Window w)
unsigned char *p = NULL; unsigned char *p = NULL;
unsigned long n, extra; unsigned long n, extra;
Atom real; Atom real;
status = XGetWindowProperty(disp, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState], status = XGetWindowProperty(disp, w, XInternAtom(disp, "WM_STATE", False),
0L, 2L, False, XInternAtom(disp, "WM_STATE", False),
&real, &format, &n, &extra, (unsigned char **) &p); &real, &format, &n, &extra, (unsigned char **) &p);
if(status != Success) if(status != Success)
return -1; return -1;
@ -147,7 +148,6 @@ setup(Display *disp, awesome_config *awesomeconf)
XSetWindowAttributes wa; XSetWindowAttributes wa;
/* init atoms */ /* init atoms */
wmatom[WMState] = XInternAtom(disp, "WM_STATE", False);
netatom[NetSupported] = XInternAtom(disp, "_NET_SUPPORTED", False); netatom[NetSupported] = XInternAtom(disp, "_NET_SUPPORTED", False);
netatom[NetWMName] = XInternAtom(disp, "_NET_WM_NAME", False); netatom[NetWMName] = XInternAtom(disp, "_NET_WM_NAME", False);
XChangeProperty(disp, DefaultRootWindow(disp), netatom[NetSupported], XA_ATOM, 32, XChangeProperty(disp, DefaultRootWindow(disp), netatom[NetSupported], XA_ATOM, 32,

View File

@ -39,7 +39,7 @@ enum
enum enum
{ NetSupported, NetWMName, NetLast }; /* EWMH atoms */ { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
enum enum
{ WMState, WMLast }; /* default atoms */ { WMLast }; /* default atoms */
Bool gettextprop(Display *, Window, Atom, char *, unsigned int); /* return text property, UTF-8 compliant */ Bool gettextprop(Display *, Window, Atom, char *, unsigned int); /* return text property, UTF-8 compliant */
void updatebarpos(Display *, Statusbar); /* updates the bar position */ void updatebarpos(Display *, Statusbar); /* updates the bar position */

View File

@ -136,7 +136,8 @@ setclientstate(Client * c, long state)
{ {
long data[] = { state, None }; long data[] = { state, None };
XChangeProperty(c->display, c->win, wmatom[WMState], wmatom[WMState], 32, XChangeProperty(c->display, c->win, XInternAtom(c->display, "WM_STATE", False),
XInternAtom(c->display, "WM_STATE", False), 32,
PropModeReplace, (unsigned char *) data, 2); PropModeReplace, (unsigned char *) data, 2);
} }