From 56b92a20b418468cc120895e558a73cb769c6251 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 10 Sep 2007 16:47:20 +0200 Subject: [PATCH] remove WMState --- awesome.c | 4 ++-- awesome.h | 2 +- client.c | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/awesome.c b/awesome.c index 182f7c899..bb60eddb7 100644 --- a/awesome.c +++ b/awesome.c @@ -96,7 +96,8 @@ getstate(Display *disp, Window w) unsigned char *p = NULL; unsigned long n, extra; 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); if(status != Success) return -1; @@ -147,7 +148,6 @@ setup(Display *disp, awesome_config *awesomeconf) XSetWindowAttributes wa; /* init atoms */ - wmatom[WMState] = XInternAtom(disp, "WM_STATE", False); netatom[NetSupported] = XInternAtom(disp, "_NET_SUPPORTED", False); netatom[NetWMName] = XInternAtom(disp, "_NET_WM_NAME", False); XChangeProperty(disp, DefaultRootWindow(disp), netatom[NetSupported], XA_ATOM, 32, diff --git a/awesome.h b/awesome.h index 3f3cd22ab..e8e1be980 100644 --- a/awesome.h +++ b/awesome.h @@ -39,7 +39,7 @@ enum enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ enum -{ WMState, WMLast }; /* default atoms */ +{ WMLast }; /* default atoms */ Bool gettextprop(Display *, Window, Atom, char *, unsigned int); /* return text property, UTF-8 compliant */ void updatebarpos(Display *, Statusbar); /* updates the bar position */ diff --git a/client.c b/client.c index 27587f539..833a9ba78 100644 --- a/client.c +++ b/client.c @@ -136,7 +136,8 @@ setclientstate(Client * c, long state) { 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); }