diff --git a/screen.h b/screen.h index b1c75be6..eff01fd8 100644 --- a/screen.h +++ b/screen.h @@ -40,6 +40,7 @@ struct a_screen xcb_window_t window; /** Systray window parent */ xcb_window_t parent; + /** Is awesome the systray owner? */ bool registered; } systray; /** Previously focused client */ diff --git a/systray.c b/systray.c index e229035c..8a018e08 100644 --- a/systray.c +++ b/systray.c @@ -56,15 +56,15 @@ systray_init(int phys_screen) void systray_refresh() { - bool has_systray; int nscreen = xcb_setup_roots_length(xcb_get_setup(globalconf.connection)); for(int phys_screen = 0; phys_screen < nscreen; phys_screen++) { - has_systray = false; + bool has_systray = false; foreach(w, globalconf.wiboxes) - if(phys_screen == (*w)->ctx.phys_screen) - has_systray |= (*w)->has_systray; + if(phys_screen == (*w)->ctx.phys_screen && (*w)->has_systray) + /* Can't use "break" with foreach() :( */ + has_systray = true; if(has_systray) systray_register(phys_screen);