summaryrefslogtreecommitdiff
path: root/app/cwm/xevents.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2013-05-19 17:03:56 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2013-05-19 17:03:56 +0000
commit5a75fb626194e13b934b218637509ca454690b89 (patch)
treef0d6a80f19566841190815a797ff1806b3dbde66 /app/cwm/xevents.c
parent8890c6b9266135aeb05f08fb94d87ea04e05133d (diff)
treat WM_CHANGE_STATE like other atoms
Diffstat (limited to 'app/cwm/xevents.c')
-rw-r--r--app/cwm/xevents.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/cwm/xevents.c b/app/cwm/xevents.c
index 978989853..f3e7221b9 100644
--- a/app/cwm/xevents.c
+++ b/app/cwm/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xevents.c,v 1.77 2013/05/19 17:01:29 okan Exp $
+ * $OpenBSD: xevents.c,v 1.78 2013/05/19 17:03:55 okan Exp $
*/
/*
@@ -340,16 +340,13 @@ static void
xev_handle_clientmessage(XEvent *ee)
{
XClientMessageEvent *e = &ee->xclient;
- Atom xa_wm_change_state;
struct client_ctx *cc;
- xa_wm_change_state = XInternAtom(X_Dpy, "WM_CHANGE_STATE", False);
-
if ((cc = client_find(e->window)) == NULL)
return;
- if (e->message_type == xa_wm_change_state && e->format == 32 &&
- e->data.l[0] == IconicState)
+ if (e->message_type == cwmh[WM_CHANGE_STATE].atom &&
+ e->format == 32 && e->data.l[0] == IconicState)
client_hide(cc);
}