From d7d70714d7943ac4201072b0605fb923ba1f29a0 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 18 Jul 2010 09:54:30 +0200 Subject: [PATCH] Kick out the systray when wiping a wibox When a wibox is destroyed or detached from a screen, it is wiped to clean up its resources. This also includes destroying the window which is associated with the wibox. The problem here is that if the wibox contains the systray, the systray window would automatically be destroyed since all childs of a window are destroyed when said window is destroyed. To fix this, we kick out the systray window before destroying the wibox' window. Signed-off-by: Uli Schlachter --- wibox.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wibox.c b/wibox.c index e72690fd4..c6becc5b6 100644 --- a/wibox.c +++ b/wibox.c @@ -692,9 +692,14 @@ wibox_wipe(wibox_t *w) { if(w->window) { + int phys_screen = w->ctx.phys_screen; + /* Activate BMA */ client_ignore_enterleave_events(); xcb_destroy_window(globalconf.connection, w->window); + /* Make sure we don't accidentally kill the systray window */ + if(globalconf.screens.tab[phys_screen].systray.parent == w->window) + wibox_systray_kickout(phys_screen); /* Deactivate BMA */ client_restore_enterleave_events(); w->window = XCB_NONE;