From e59086f2bfc5f7163e5b2f77d66f4473e5938b63 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 11 Aug 2010 11:56:47 +0200 Subject: [PATCH] Ignore all reparents to the root window Signed-off-by: Uli Schlachter --- event.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/event.c b/event.c index fb21794e..e2b86ce3 100644 --- a/event.c +++ b/event.c @@ -748,7 +748,13 @@ event_handle_reparentnotify(xcb_reparent_notify_event_t *ev) client_t *c; if((c = client_getbywin(ev->window)) && c->frame_window != ev->parent) - client_unmanage(c); + { + /* Ignore reparents to the root window, they *might* be caused by + * ourselves if a client quickly unmaps and maps itself again. */ + xcb_screen_t *s = xutil_screen_get(globalconf.connection, c->phys_screen); + if (ev->parent != s->root) + client_unmanage(c); + } } /** \brief awesome xerror function.