Cfactor/Mouse: Code cosmetic
This commit is contained in:
parent
a06e0daa5a
commit
eeedd9e4be
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
10
src/mouse.c
10
src/mouse.c
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user