treat WM_CHANGE_STATE like other atoms

This commit is contained in:
okan
2013-05-19 17:03:55 +00:00
parent 01bfdd7b42
commit 556a50d8f7
3 changed files with 4 additions and 5 deletions

View File

@@ -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);
}