Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dangra/409310 to your computer and use it in GitHub Desktop.
Save dangra/409310 to your computer and use it in GitHub Desktop.
diff --git a/objects/wibox.c b/objects/wibox.c
index c33f77f..fd69fb4 100644
--- a/objects/wibox.c
+++ b/objects/wibox.c
@@ -431,6 +431,10 @@ wibox_systray_kickout(int phys_screen)
static void
wibox_systray_refresh(wibox_t *wibox)
{
+ bool systray_found = false;
+ int phys_screen = wibox->ctx.phys_screen;
+ screen_t screen = globalconf.screens.tab[phys_screen];
+
if(!wibox->screen)
return;
@@ -443,9 +447,8 @@ wibox_systray_refresh(wibox_t *wibox)
uint32_t config_win_vals[4];
uint32_t config_win_vals_off[2] = { -512, -512 };
xembed_window_t *em;
- int phys_screen = wibox->ctx.phys_screen;
- screen_t screen = globalconf.screens.tab[phys_screen];
+ systray_found = true;
if(!screen.systray.registered)
systray_register(phys_screen);
@@ -590,6 +593,9 @@ wibox_systray_refresh(wibox_t *wibox)
break;
}
}
+
+ if(!systray_found && screen.systray.registered)
+ systray_cleanup(phys_screen);
}
/** Get a wibox by its window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment