about summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorokan <okan>2013-11-12 21:25:00 +0000
committerokan <okan>2013-11-12 21:25:00 +0000
commit2937b2066f005ccb6f89bfe6480284874a398feb (patch)
tree27be895b7112ac1bd77976eb4a84008ff96b514b /client.c
parentbda68b09244bc2130839e6a828158cf1a9f0839b (diff)
downloadcwm-2937b2066f005ccb6f89bfe6480284874a398feb.tar.gz
cwm-2937b2066f005ccb6f89bfe6480284874a398feb.tar.xz
cwm-2937b2066f005ccb6f89bfe6480284874a398feb.zip
Alter the r1.35 of event.c race fix. Remove the forward looking event
queue check (removing the need for a server grab/ungrab) - if the client
is going away, let it fall all the way through to a DestroyNotify event.
There's no longer a need for us to manually destroy a client ourselves
(removing yet another server grab/ungrab).  Instead, when the
UnmapNotify event is synthetic, simply set the state to Withdrawn (as
per ICCCM), else Iconic (in our case 'hidden').

Verified with test case from the 2009 race which was the original reason
for r1.35 of event.c.
Diffstat (limited to 'client.c')
-rw-r--r--client.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/client.c b/client.c
index 1c559d4..173c0f5 100644
--- a/client.c
+++ b/client.c
@@ -149,20 +149,11 @@ client_init(Window win, struct screen_ctx *sc, int mapped)
 }
 
 void
-client_delete(struct client_ctx *cc, int destroy)
+client_delete(struct client_ctx *cc)
 {
 	struct screen_ctx	*sc = cc->sc;
 	struct winname		*wn;
 
-	if (destroy) {
-		XGrabServer(X_Dpy);
-		cc->state = WithdrawnState;
-		xu_set_wm_state(cc->win, cc->state);
-		XRemoveFromSaveSet(X_Dpy, cc->win);
-		XSync(X_Dpy, False);
-		XUngrabServer(X_Dpy);
-	}
-
 	TAILQ_REMOVE(&sc->mruq, cc, mru_entry);
 	TAILQ_REMOVE(&Clientq, cc, entry);