Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
simplified unmanage
[dwm.git]
/
view.c
diff --git
a/view.c
b/view.c
index
eddf2da
..
5cbab08
100644
(file)
--- a/
view.c
+++ b/
view.c
@@
-12,22
+12,14
@@
minclient()
{
Client *c, *min;
{
Client *c, *min;
+ if((clients && clients->isfloat) || arrange == dofloat)
+ return clients; /* don't touch floating order */
for(min = c = clients; c; c = c->next)
if(c->weight < min->weight)
min = c;
return min;
}
for(min = c = clients; c; c = c->next)
if(c->weight < min->weight)
min = c;
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()
{
@@
-84,8
+76,10
@@
dofloat(Arg *arg)
else
ban(c);
}
else
ban(c);
}
- if(!sel || !isvisible(sel))
- focus(getnext(clients));
+ if(!sel || !isvisible(sel)) {
+ for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
+ focus(sel);
+ }
restack();
}
restack();
}
@@
-146,8
+140,10
@@
dotile(Arg *arg)
else
ban(c);
}
else
ban(c);
}
- if(!sel || !isvisible(sel))
- focus(getnext(clients));
+ if(!sel || !isvisible(sel)) {
+ for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
+ focus(sel);
+ }
restack();
}
restack();
}
@@
-232,11
+228,10
@@
restack()
return;
}
if(sel->isfloat || arrange == dofloat) {
return;
}
if(sel->isfloat || arrange == dofloat) {
- pop(sel);
XRaiseWindow(dpy, sel->win);
XRaiseWindow(dpy, sel->twin);
}
XRaiseWindow(dpy, sel->win);
XRaiseWindow(dpy, sel->twin);
}
- if(arrange != dofloat)
+ if(arrange != dofloat)
for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
XLowerWindow(dpy, c->twin);
XLowerWindow(dpy, c->win);
for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
XLowerWindow(dpy, c->twin);
XLowerWindow(dpy, c->win);
@@
-307,7
+302,11
@@
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;
- pop(c);
+ detach(c);
+ if(clients)
+ clients->prev = c;
+ c->next = clients;
+ clients = c;
focus(c);
arrange(NULL);
}
focus(c);
arrange(NULL);
}