wibox: reparent systray only if needed (FS#436)

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-01-30 16:13:34 +01:00
parent f45cdee4eb
commit 5536d8e78b
1 changed files with 10 additions and 7 deletions

View File

@ -109,6 +109,8 @@ wibox_systray_kickout(int phys_screen)
{ {
xcb_screen_t *s = xutil_screen_get(globalconf.connection, phys_screen); xcb_screen_t *s = xutil_screen_get(globalconf.connection, phys_screen);
if(globalconf.screens[phys_screen].systray.parent != s->root)
{
/* Who! Check that we're not deleting a wibox with a systray, because it /* Who! Check that we're not deleting a wibox with a systray, because it
* may be its parent. If so, we reparent to root before, otherwise it will * may be its parent. If so, we reparent to root before, otherwise it will
* hurt very much. */ * hurt very much. */
@ -118,6 +120,7 @@ wibox_systray_kickout(int phys_screen)
globalconf.screens[phys_screen].systray.parent = s->root; globalconf.screens[phys_screen].systray.parent = s->root;
} }
}
static void static void
wibox_systray_refresh(wibox_t *wibox) wibox_systray_refresh(wibox_t *wibox)