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 Bool
cfactor_parentrow(XRectangle cg, XRectangle ccg, Position p) cfactor_parentrow(XRectangle cg, XRectangle ccg, Position p)
{ {
Bool ret;
switch(p) switch(p)
{ {
case Left: case Left:
ret = (ccg.x == cg.x); return (ccg.x == cg.x);
break;
case Top: case Top:
ret = (ccg.y == cg.y); return (ccg.y == cg.y);
break;
case Bottom: case Bottom:
ret = (ccg.y + ccg.height == cg.y + cg.height); return (ccg.y + ccg.height == cg.y + cg.height);
break;
case Right: case Right:
default: default:
ret = (ccg.x + ccg.width == cg.x + cg.width); return (ccg.x + ccg.width == cg.x + cg.width);
break;
} }
return ret; return False;
} }
/** Get c parents of row and resize /** Get c parents of row and resize

View File

@@ -173,7 +173,7 @@ uicb_layout_prev(uicb_t cmd)
Client* Client*
tiled_client(int screen, Client *c) 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 || c->screen != screen
|| ishide(c, screen)); c = c->next); || ishide(c, screen)); c = c->next);

View File

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