Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
pop on heretag
[dwm.git]
/
client.c
diff --git
a/client.c
b/client.c
index
522a425
..
fa48644
100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-66,8
+66,8
@@
focusnext(Arg *arg)
if(!sel)
return;
if(!sel)
return;
- if(!(c = getnext(sel->next)))
- c = getnext(clients);
+ if(!(c = getnext(sel->next
, tsel
)))
+ c = getnext(clients
, tsel
);
if(c) {
higher(c);
c->revert = sel;
if(c) {
higher(c);
c->revert = sel;
@@
-250,6
+250,7
@@
manage(Window w, XWindowAttributes *wa)
ban(c);
XMapRaised(dpy, c->win);
XMapRaised(dpy, c->title);
ban(c);
XMapRaised(dpy, c->win);
XMapRaised(dpy, c->title);
+ XSync(dpy, False);
}
}
}
}
@@
-266,6
+267,18
@@
maximize(Arg *arg)
resize(sel, False);
}
resize(sel, False);
}
+void
+pop(Client *c)
+{
+ Client **l;
+ for(l = &clients; *l && *l != c; l = &(*l)->next);
+ *l = c->next;
+
+ c->next = clients; /* pop */
+ clients = c;
+ arrange(NULL);
+}
+
void
resize(Client *c, Bool inc)
{
void
resize(Client *c, Bool inc)
{
@@
-404,21
+417,16
@@
unmanage(Client *c)
void
zoom(Arg *arg)
{
void
zoom(Arg *arg)
{
- Client *
*l, *
c;
+ Client *c;
if(!sel)
return;
if(!sel)
return;
- if(sel == getnext(clients) && sel->next) {
- if((c = getnext(sel->next)))
+ if(sel == getnext(clients
, tsel
) && sel->next) {
+ if((c = getnext(sel->next
, tsel
)))
sel = c;
}
sel = c;
}
- for(l = &clients; *l && *l != sel; l = &(*l)->next);
- *l = sel->next;
-
- sel->next = clients; /* pop */
- clients = sel;
- arrange(NULL);
+ pop(sel);
focus(sel);
}
focus(sel);
}