diff options
author | okan <okan> | 2013-11-12 21:25:00 +0000 |
---|---|---|
committer | okan <okan> | 2013-11-12 21:25:00 +0000 |
commit | 3c78191e2ef0b51da1f70327cc9b7e087413f88d (patch) | |
tree | e484d9a127aa41ed3087e3fd63cb9235b8e5172a /xevents.c | |
parent | 2037332bb73899b7fc8884bf94b108c128aaee6f (diff) | |
parent | 2937b2066f005ccb6f89bfe6480284874a398feb (diff) | |
download | cwm-3c78191e2ef0b51da1f70327cc9b7e087413f88d.tar.gz cwm-3c78191e2ef0b51da1f70327cc9b7e087413f88d.tar.xz cwm-3c78191e2ef0b51da1f70327cc9b7e087413f88d.zip |
cvsimport
Diffstat (limited to 'xevents.c')
-rw-r--r-- | xevents.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/xevents.c b/xevents.c index 57a43c5..0d7c41c 100644 --- a/xevents.c +++ b/xevents.c @@ -97,27 +97,15 @@ static void xev_handle_unmapnotify(XEvent *ee) { XUnmapEvent *e = &ee->xunmap; - XEvent ev; struct client_ctx *cc; - /* XXX, we need a recursive locking wrapper around grab server */ - XGrabServer(X_Dpy); if ((cc = client_find(e->window)) != NULL) { - /* - * If it's going to die anyway, nuke it. - * - * Else, if it's a synthetic event delete state, since they - * want it to be withdrawn. ICCM recommends you withdraw on - * this even if we haven't alredy been told to iconify, to - * deal with legacy clients. - */ - if (XCheckTypedWindowEvent(X_Dpy, cc->win, - DestroyNotify, &ev) || e->send_event != 0) { - client_delete(cc, 1); + if (e->send_event) { + cc->state = WithdrawnState; + xu_set_wm_state(cc->win, cc->state); } else client_hide(cc); } - XUngrabServer(X_Dpy); } static void @@ -127,7 +115,7 @@ xev_handle_destroynotify(XEvent *ee) struct client_ctx *cc; if ((cc = client_find(e->window)) != NULL) - client_delete(cc, 0); + client_delete(cc); } static void |