Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
I change the style of init somewhat, init as early as possible.
[dwm.git]
/
layout.c
diff --git
a/layout.c
b/layout.c
index
f3f8e26
..
acf0a8e
100644
(file)
--- a/
layout.c
+++ b/
layout.c
@@
-11,22
+11,6
@@
static unsigned int nlayouts = 0;
static unsigned int masterw = MASTERWIDTH;
static unsigned int nmaster = NMASTER;
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;
static void
tile(void) {
unsigned int i, n, nx, ny, nw, nh, mw, mh, tw, th;
@@
-88,9
+72,7
@@
floating(void) {
for(c = clients; c; c = c->next)
if(isvisible(c)) {
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
resize(c, c->x, c->y, c->w, c->h, True);
}
else