Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
c3fa9e8
)
s/nextunfloating/nexttiled/, changed zoom() behavior
author
Anselm R Garbe <
[email protected]
>
Thu, 22 May 2008 10:12:22 +0000
(11:12 +0100)
committer
Anselm R Garbe <
[email protected]
>
Thu, 22 May 2008 10:12:22 +0000
(11:12 +0100)
dwm.c
diff
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
5138752
..
8dc88fe
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-156,7
+156,7
@@
void manage(Window w, XWindowAttributes *wa);
void mappingnotify(XEvent *e);
void maprequest(XEvent *e);
void movemouse(Client *c);
void mappingnotify(XEvent *e);
void maprequest(XEvent *e);
void movemouse(Client *c);
-Client *next
unfloating
(Client *c);
+Client *next
tiled
(Client *c);
void propertynotify(XEvent *e);
void quit(const void *arg);
void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
void propertynotify(XEvent *e);
void quit(const void *arg);
void resize(Client *c, int x, int y, int w, int h, Bool sizehints);
@@
-1051,7
+1051,7
@@
movemouse(Client *c) {
}
Client *
}
Client *
-next
unfloating
(Client *c) {
+next
tiled
(Client *c) {
for(; c && (c->isfloating || !isvisible(c)); c = c->next);
return c;
}
for(; c && (c->isfloating || !isvisible(c)); c = c->next);
return c;
}
@@
-1464,12
+1464,12
@@
tile(void) {
uint i, n;
Client *c;
uint i, n;
Client *c;
- for(n = 0, c = next
unfloating(clients); c; c = nextunfloating
(c->next), n++);
+ for(n = 0, c = next
tiled(clients); c; c = nexttiled
(c->next), n++);
if(n == 0)
return;
/* master */
if(n == 0)
return;
/* master */
- c = next
unfloating
(clients);
+ c = next
tiled
(clients);
if(n == 1)
tileresize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw);
if(n == 1)
tileresize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw);
@@
-1487,7
+1487,7
@@
tile(void) {
if(h < bh)
h = th;
if(h < bh)
h = th;
- for(i = 0, c = next
unfloating(c->next); c; c = nextunfloating
(c->next), i++) {
+ for(i = 0, c = next
tiled(c->next); c; c = nexttiled
(c->next), i++) {
if(i + 1 == n) /* remainder */
tileresize(c, x, y, w - 2 * c->bw, (ty + th) - y - 2 * c->bw);
else
if(i + 1 == n) /* remainder */
tileresize(c, x, y, w - 2 * c->bw, (ty + th) - y - 2 * c->bw);
else
@@
-1789,14
+1789,14
@@
void
zoom(const void *arg) {
Client *c = sel;
zoom(const void *arg) {
Client *c = sel;
- if(c == nextunfloating(clients))
- if(!c || !(c = nextunfloating(c->next)))
+ if(!lt->arrange || sel->isfloating)
+ return;
+ if(c == nexttiled(clients))
+ if(!c || !(c = nexttiled(c->next)))
return;
return;
- if(lt->arrange == tile && !sel->isfloating) {
- detach(c);
- attach(c);
- focus(c);
- }
+ detach(c);
+ attach(c);
+ focus(c);
arrange();
}
arrange();
}