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:
Uli Schlachter 2010-07-22 09:23:13 +02:00
parent cc31fc32e6
commit 418f3d0b37
2 changed files with 5 additions and 4 deletions

View File

@ -37,6 +37,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 */

View File

@ -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);