X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/9fdd2cd1a9dbe9b533fab9a8a98b9849dc4c7b59..ff957d1eaca73800e59f640351dce35e3ab67f9e:/layout.c diff --git a/layout.c b/layout.c index 92c6a53..acf0a8e 100644 --- a/layout.c +++ b/layout.c @@ -1,8 +1,4 @@ -/* © 2006-2007 Anselm R. Garbe - * © 2006-2007 Sander van Dijk - * © 2007 Premysl Hruby - * © 2007 Szabolcs Nagy - * See LICENSE file for license details. */ +/* See LICENSE file for copyright and license details. */ #include "dwm.h" #include @@ -15,22 +11,6 @@ static unsigned int nlayouts = 0; static unsigned int masterw = MASTERWIDTH; static unsigned int nmaster = NMASTER; -static void -ban(Client *c) { - if (c->isbanned) - return; - XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); - c->isbanned = True; -} - -static void -unban(Client *c) { - if (!c->isbanned) - return; - XMoveWindow(dpy, c->win, c->x, c->y); - c->isbanned = False; -} - static void tile(void) { unsigned int i, n, nx, ny, nw, nh, mw, mh, tw, th; @@ -92,9 +72,7 @@ floating(void) { for(c = clients; c; c = c->next) if(isvisible(c)) { - if(c->isbanned) - XMoveWindow(dpy, c->win, c->x, c->y); - c->isbanned = False; + unban(c); resize(c, c->x, c->y, c->w, c->h, True); } else @@ -247,7 +225,7 @@ togglemax(const char *arg) { sel->ry = sel->y; sel->rw = sel->w; sel->rh = sel->h; - resize(sel, wax, way, waw - 2 * BORDERPX, wah - 2 * BORDERPX, True); + resize(sel, wax, way, waw - 2 * sel->border, wah - 2 * sel->border, True); } else resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True);