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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-07-18 09:54:30 +02:00
parent f8c9b6f704
commit ddedb961d3
1 changed files with 5 additions and 0 deletions

View File

@ -62,8 +62,13 @@ wibox_wipe_resources(wibox_t *w)
{
if(w->window)
{
int phys_screen = w->ctx.phys_screen;
/* Activate BMA */
client_ignore_enterleave_events();
/* 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);
xcb_destroy_window(globalconf.connection, w->window);
/* Deactivate BMA */
client_restore_enterleave_events();