use similiar style for client flags

This commit is contained in:
okan 2014-09-15 13:00:49 +00:00
parent 26b95de019
commit 4b6dc96398
4 changed files with 7 additions and 7 deletions

View File

@ -187,7 +187,7 @@ client_setactive(struct client_ctx *cc)
XInstallColormap(X_Dpy, cc->colormap); XInstallColormap(X_Dpy, cc->colormap);
if ((cc->flags & CLIENT_INPUT) || if ((cc->flags & CLIENT_INPUT) ||
((cc->flags & CLIENT_WM_TAKE_FOCUS) == 0)) { (!(cc->flags & CLIENT_WM_TAKE_FOCUS))) {
XSetInputFocus(X_Dpy, cc->win, XSetInputFocus(X_Dpy, cc->win,
RevertToPointerRoot, CurrentTime); RevertToPointerRoot, CurrentTime);
} }
@ -260,7 +260,7 @@ client_fullscreen(struct client_ctx *cc)
!(cc->flags & CLIENT_FULLSCREEN)) !(cc->flags & CLIENT_FULLSCREEN))
return; return;
if ((cc->flags & CLIENT_FULLSCREEN)) { if (cc->flags & CLIENT_FULLSCREEN) {
cc->bwidth = Conf.bwidth; cc->bwidth = Conf.bwidth;
cc->geom = cc->fullgeom; cc->geom = cc->fullgeom;
cc->flags &= ~(CLIENT_FULLSCREEN | CLIENT_FREEZE); cc->flags &= ~(CLIENT_FULLSCREEN | CLIENT_FREEZE);
@ -297,12 +297,12 @@ client_maximize(struct client_ctx *cc)
goto resize; goto resize;
} }
if ((cc->flags & CLIENT_VMAXIMIZED) == 0) { if (!(cc->flags & CLIENT_VMAXIMIZED)) {
cc->savegeom.h = cc->geom.h; cc->savegeom.h = cc->geom.h;
cc->savegeom.y = cc->geom.y; cc->savegeom.y = cc->geom.y;
} }
if ((cc->flags & CLIENT_HMAXIMIZED) == 0) { if (!(cc->flags & CLIENT_HMAXIMIZED)) {
cc->savegeom.w = cc->geom.w; cc->savegeom.w = cc->geom.w;
cc->savegeom.x = cc->geom.x; cc->savegeom.x = cc->geom.x;
} }

View File

@ -102,7 +102,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
tier++; tier++;
/* Clients that are hidden get ranked one up. */ /* Clients that are hidden get ranked one up. */
if (cc->flags & CLIENT_HIDDEN && tier > 0) if ((cc->flags & CLIENT_HIDDEN) && (tier > 0))
tier--; tier--;
assert(tier < nitems(tierp)); assert(tier < nitems(tierp));

View File

@ -82,7 +82,7 @@ xev_handle_maprequest(XEvent *ee)
if ((cc = client_find(e->window)) == NULL) if ((cc = client_find(e->window)) == NULL)
cc = client_init(e->window, NULL); cc = client_init(e->window, NULL);
if ((cc != NULL) && ((cc->flags & CLIENT_IGNORE) == 0)) if ((cc != NULL) && (!(cc->flags & CLIENT_IGNORE)))
client_ptrwarp(cc); client_ptrwarp(cc);
} }

View File

@ -393,7 +393,7 @@ xu_ewmh_handle_net_wm_state_msg(struct client_ctx *cc, int action,
continue; continue;
switch (action) { switch (action) {
case _NET_WM_STATE_ADD: case _NET_WM_STATE_ADD:
if ((cc->flags & handlers[i].property) == 0) if (!(cc->flags & handlers[i].property))
handlers[i].toggle(cc); handlers[i].toggle(cc);
break; break;
case _NET_WM_STATE_REMOVE: case _NET_WM_STATE_REMOVE: