Cfactor/Mouse: Code cosmetic

This commit is contained in:
Martin Duquesnoy 2011-06-06 13:18:51 +02:00
parent a06e0daa5a
commit eeedd9e4be
3 changed files with 10 additions and 18 deletions

View File

@ -107,26 +107,20 @@ cfactor_geo(XRectangle geo, int fact[4], int *err)
Bool
cfactor_parentrow(XRectangle cg, XRectangle ccg, Position p)
{
Bool ret;
switch(p)
{
case Left:
ret = (ccg.x == cg.x);
break;
return (ccg.x == cg.x);
case Top:
ret = (ccg.y == cg.y);
break;
return (ccg.y == cg.y);
case Bottom:
ret = (ccg.y + ccg.height == cg.y + cg.height);
break;
return (ccg.y + ccg.height == cg.y + cg.height);
case Right:
default:
ret = (ccg.x + ccg.width == cg.x + cg.width);
break;
return (ccg.x + ccg.width == cg.x + cg.width);
}
return ret;
return False;
}
/** Get c parents of row and resize

View File

@ -173,7 +173,7 @@ uicb_layout_prev(uicb_t cmd)
Client*
tiled_client(int screen, Client *c)
{
for(;c && ((c->flags & (MaxFlag | FreeFlag | FSSFlag | AboveFlag))
for(;c && (c->flags & (MaxFlag | FreeFlag | FSSFlag | AboveFlag)
|| c->screen != screen
|| ishide(c, screen)); c = c->next);

View File

@ -69,7 +69,7 @@ mouse_move_tile_client(Client **c)
Window w;
int d;
if(!((*c)->flags & TileFlag) && !((*c)->flags & LMaxFlag))
if(!((*c)->flags & (TileFlag | LMaxFlag)))
return;
XQueryPointer(dpy, ROOT, &w, &w, &d, &d, &d, &d, (uint*)&d);
@ -95,7 +95,7 @@ mouse_move_tag_client(Client *c)
Window w;
int i, d, s;
if(!(c->flags & TileFlag) && !(c->flags & LMaxFlag))
if(!(c->flags & (TileFlag | LMaxFlag)))
return;
s = c->screen;
@ -135,7 +135,7 @@ mouse_move(Client *c)
GC gci;
XEvent ev;
if((c->flags & MaxFlag) || (c->flags & FSSFlag))
if(c->flags & (MaxFlag | FSSFlag))
return;
ocx = c->geo.x;
@ -220,9 +220,7 @@ mouse_resize(Client *c)
GC gci;
int f[4] = { 0 };
if((c->flags & MaxFlag)
|| (c->flags & LMaxFlag)
|| (c->flags & FSSFlag))
if(c->flags & (MaxFlag | LMaxFlag | FSSFlag))
return;
XQueryPointer(dpy, ROOT, &w, &w, &omx, &omy, &d, &d, (uint *)&u);