Minor cleanup
Or'ing into a bool feels dirty and the struct members should all be documented. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
f47b816996
commit
a53aac0dde
1
screen.h
1
screen.h
|
@ -40,6 +40,7 @@ struct a_screen
|
||||||
xcb_window_t window;
|
xcb_window_t window;
|
||||||
/** Systray window parent */
|
/** Systray window parent */
|
||||||
xcb_window_t parent;
|
xcb_window_t parent;
|
||||||
|
/** Is awesome the systray owner? */
|
||||||
bool registered;
|
bool registered;
|
||||||
} systray;
|
} systray;
|
||||||
/** Previously focused client */
|
/** Previously focused client */
|
||||||
|
|
|
@ -56,15 +56,15 @@ systray_init(int phys_screen)
|
||||||
void
|
void
|
||||||
systray_refresh()
|
systray_refresh()
|
||||||
{
|
{
|
||||||
bool has_systray;
|
|
||||||
int nscreen = xcb_setup_roots_length(xcb_get_setup(globalconf.connection));
|
int nscreen = xcb_setup_roots_length(xcb_get_setup(globalconf.connection));
|
||||||
|
|
||||||
for(int phys_screen = 0; phys_screen < nscreen; phys_screen++)
|
for(int phys_screen = 0; phys_screen < nscreen; phys_screen++)
|
||||||
{
|
{
|
||||||
has_systray = false;
|
bool has_systray = false;
|
||||||
foreach(w, globalconf.wiboxes)
|
foreach(w, globalconf.wiboxes)
|
||||||
if(phys_screen == (*w)->ctx.phys_screen)
|
if(phys_screen == (*w)->ctx.phys_screen && (*w)->has_systray)
|
||||||
has_systray |= (*w)->has_systray;
|
/* Can't use "break" with foreach() :( */
|
||||||
|
has_systray = true;
|
||||||
|
|
||||||
if(has_systray)
|
if(has_systray)
|
||||||
systray_register(phys_screen);
|
systray_register(phys_screen);
|
||||||
|
|
Loading…
Reference in New Issue