Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
no this is better
[dwm.git]
/
view.c
diff --git
a/view.c
b/view.c
index
3b5abba
..
eddf2da
100644
(file)
--- a/
view.c
+++ b/
view.c
@@
-18,6
+18,15
@@
minclient()
return min;
}
return min;
}
+static void
+pop(Client *c)
+{
+ detach(c);
+ if(clients)
+ clients->prev = c;
+ c->next = clients;
+ clients = c;
+}
static void
reorder()
static void
reorder()
@@
-218,9
+227,12
@@
restack()
Client *c;
XEvent ev;
Client *c;
XEvent ev;
- if(!sel)
+ if(!sel) {
+ drawstatus();
return;
return;
+ }
if(sel->isfloat || arrange == dofloat) {
if(sel->isfloat || arrange == dofloat) {
+ pop(sel);
XRaiseWindow(dpy, sel->win);
XRaiseWindow(dpy, sel->twin);
}
XRaiseWindow(dpy, sel->win);
XRaiseWindow(dpy, sel->twin);
}
@@
-295,10
+307,7
@@
zoom(Arg *arg)
if((c = sel) == nexttiled(clients))
if(!(c = nexttiled(c->next)))
return;
if((c = sel) == nexttiled(clients))
if(!(c = nexttiled(c->next)))
return;
- detach(c);
- c->next = clients;
- clients->prev = c;
- clients = c;
+ pop(c);
focus(c);
arrange(NULL);
}
focus(c);
arrange(NULL);
}