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 f47b816996
commit a53aac0dde
2 changed files with 5 additions and 4 deletions

View File

@ -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 */

View File

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