diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-07-09 22:44:15 +0300 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-07-20 18:52:17 +0300 |
| commit | b3843f04023113569654e64cae12c86f1b77c09c (patch) | |
| tree | ab69b95b2d4ab95f575ace28d16e5456589bdf12 /monsterwm.c | |
| parent | d598fa82684f00fcc958502170a445e66a427ef9 (diff) | |
rework stack function - reorder if/else/return statements
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/monsterwm.c b/monsterwm.c index a5ccbe1..c923ab1 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -811,10 +811,8 @@ void stack(int hh, int cy, Desktop *d) { * - p is the num of pixels than remain when spliting * the available width/height to the number of windows * - z is the clients' height/width */ - if (!c) return; else if (!n) { - XMoveResizeWindow(dis, c->win, 0, cy, ww - 2*BORDER_WIDTH, hh - 2*BORDER_WIDTH); - return; - } else if (n > 1) { p = z%n; z /= n; } + if (c && !n) XMoveResizeWindow(dis, c->win, 0, cy, ww - 2*BORDER_WIDTH, hh - 2*BORDER_WIDTH); + if (!c || !n) return; else if (n > 1) { p = z%n; z /= n; } /* tile the first non-floating, non-fullscreen window to cover the master area */ if (b) XMoveResizeWindow(dis, c->win, 0, cy, ww - 2*BORDER_WIDTH, ma - BORDER_WIDTH); |
