Mercurial > aewl
annotate view.c @ 657:ce3538c5c0d9
removed the term clients from dwm.1
author | Anselm R. Garbe <arg@suckless.org> |
---|---|
date | Fri, 05 Jan 2007 15:37:10 +0100 |
parents | c30805f6bb08 |
children | b4d1ef7e407f |
rev | line source |
---|---|
644 | 1 /* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com> |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
2 * See LICENSE file for license details. |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
3 */ |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
4 #include "dwm.h" |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
5 |
380
4bf79305d675
this algorithm seems to keep order for any scenario
Anselm R. Garbe <arg@10kloc.org>
parents:
378
diff
changeset
|
6 /* static */ |
4bf79305d675
this algorithm seems to keep order for any scenario
Anselm R. Garbe <arg@10kloc.org>
parents:
378
diff
changeset
|
7 |
382 | 8 static Client * |
480 | 9 nexttiled(Client *c) { |
10 for(c = getnext(c); c && c->isfloat; c = getnext(c->next)); | |
11 return c; | |
12 } | |
13 | |
651
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
14 static Bool |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
15 ismaster(Client *c) { |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
16 Client *cl; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
17 unsigned int i; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
18 |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
19 for(cl = nexttiled(clients), i = 0; cl && cl != c; cl = nexttiled(cl->next), i++); |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
20 return i < nmaster; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
21 } |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
22 |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
23 static void |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
24 pop(Client *c) { |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
25 detach(c); |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
26 if(clients) |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
27 clients->prev = c; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
28 c->next = clients; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
29 clients = c; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
30 } |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
31 |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
32 static void |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
33 swap(Client *c1, Client *c2) { |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
34 Client tmp = *c1; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
35 Client *cp = c1->prev; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
36 Client *cn = c1->next; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
37 |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
38 *c1 = *c2; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
39 c1->prev = cp; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
40 c1->next = cn; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
41 cp = c2->prev; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
42 cn = c2->next; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
43 *c2 = tmp; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
44 c2->prev = cp; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
45 c2->next = cn; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
46 } |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
47 |
442 | 48 static void |
532
651f2c868b31
code polishing, removed unnecessary newlines
Anselm R. Garbe <arg@10kloc.org>
parents:
531
diff
changeset
|
49 togglemax(Client *c) { |
481 | 50 XEvent ev; |
548 | 51 |
549 | 52 if(c->isfixed) |
548 | 53 return; |
532
651f2c868b31
code polishing, removed unnecessary newlines
Anselm R. Garbe <arg@10kloc.org>
parents:
531
diff
changeset
|
54 |
480 | 55 if((c->ismax = !c->ismax)) { |
565 | 56 c->rx = c->x; c->x = wax; |
57 c->ry = c->y; c->y = way; | |
58 c->rw = c->w; c->w = waw - 2 * BORDERPX; | |
59 c->rh = c->h; c->h = wah - 2 * BORDERPX; | |
480 | 60 } |
61 else { | |
62 c->x = c->rx; | |
63 c->y = c->ry; | |
481 | 64 c->w = c->rw; |
65 c->h = c->rh; | |
480 | 66 } |
67 resize(c, True, TopLeft); | |
68 while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); | |
430
1e8aba00964e
no, reodering floating clients definately breaks the manage() policy which attaches all clients zoomed (otherwise higher-weight clients couldn't be attached zoomed, which sucks)
Anselm R. Garbe <arg@10kloc.org>
parents:
429
diff
changeset
|
69 } |
1e8aba00964e
no, reodering floating clients definately breaks the manage() policy which attaches all clients zoomed (otherwise higher-weight clients couldn't be attached zoomed, which sucks)
Anselm R. Garbe <arg@10kloc.org>
parents:
429
diff
changeset
|
70 |
651
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
71 static Client * |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
72 topofstack() { |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
73 Client *c; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
74 unsigned int i; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
75 |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
76 for(c = nexttiled(clients), i = 0; c && i < nmaster; c = nexttiled(c->next), i++); |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
77 return (i < nmaster) ? NULL : c; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
78 } |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
79 |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
80 /* extern */ |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
81 |
533
a5567a0d3011
do* has no Arg arument anymore (never called directly)
Anselm R. Garbe <arg@10kloc.org>
parents:
532
diff
changeset
|
82 void (*arrange)(void) = DEFMODE; |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
83 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
84 void |
461
9d23330a5268
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Anselm R. Garbe <arg@10kloc.org>
parents:
450
diff
changeset
|
85 detach(Client *c) { |
378
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
86 if(c->prev) |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
87 c->prev->next = c->next; |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
88 if(c->next) |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
89 c->next->prev = c->prev; |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
90 if(c == clients) |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
91 clients = c->next; |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
92 c->next = c->prev = NULL; |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
93 } |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
94 |
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
95 void |
533
a5567a0d3011
do* has no Arg arument anymore (never called directly)
Anselm R. Garbe <arg@10kloc.org>
parents:
532
diff
changeset
|
96 dofloat(void) { |
402 | 97 Client *c; |
400
052657ff2e7b
applied Sanders max_and_focus.patch
Anselm R. Garbe <arg@10kloc.org>
parents:
397
diff
changeset
|
98 |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
99 for(c = clients; c; c = c->next) { |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
100 if(isvisible(c)) { |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
101 resize(c, True, TopLeft); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
102 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
103 else |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
104 ban(c); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
105 } |
446
a2e587651c79
using a global stack for focus recovery on arrange() - seems to work great
Anselm R. Garbe <arg@10kloc.org>
parents:
443
diff
changeset
|
106 if(!sel || !isvisible(sel)) { |
450
728c9089b079
applied sanders patch of not manipulating sel
Anselm R. Garbe <arg@10kloc.org>
parents:
446
diff
changeset
|
107 for(c = stack; c && !isvisible(c); c = c->snext); |
728c9089b079
applied sanders patch of not manipulating sel
Anselm R. Garbe <arg@10kloc.org>
parents:
446
diff
changeset
|
108 focus(c); |
446
a2e587651c79
using a global stack for focus recovery on arrange() - seems to work great
Anselm R. Garbe <arg@10kloc.org>
parents:
443
diff
changeset
|
109 } |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
110 restack(); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
111 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
112 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
113 void |
533
a5567a0d3011
do* has no Arg arument anymore (never called directly)
Anselm R. Garbe <arg@10kloc.org>
parents:
532
diff
changeset
|
114 dotile(void) { |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
115 unsigned int i, n, mw, mh, tw, th; |
402 | 116 Client *c; |
400
052657ff2e7b
applied Sanders max_and_focus.patch
Anselm R. Garbe <arg@10kloc.org>
parents:
397
diff
changeset
|
117 |
488 | 118 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) |
119 n++; | |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
120 /* window geoms */ |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
121 mw = (n > nmaster) ? (waw * master) / 1000 : waw; |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
122 mh = (n > nmaster) ? wah / nmaster : wah / (n > 0 ? n : 1); |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
123 tw = waw - mw; |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
124 th = (n > nmaster) ? wah / (n - nmaster) : 0; |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
125 |
535 | 126 for(i = 0, c = clients; c; c = c->next) |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
127 if(isvisible(c)) { |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
128 if(c->isfloat) { |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
129 resize(c, True, TopLeft); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
130 continue; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
131 } |
488 | 132 c->ismax = False; |
565 | 133 c->x = wax; |
134 c->y = way; | |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
135 if(i < nmaster) { |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
136 c->y += i * mh; |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
137 c->w = mw - 2 * BORDERPX; |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
138 c->h = mh - 2 * BORDERPX; |
507 | 139 } |
523
c1dd19da63ef
yet another simplification of dotile()
Anselm R. Garbe <arg@10kloc.org>
parents:
522
diff
changeset
|
140 else { /* tile window */ |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
141 c->x += mw; |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
142 c->w = tw - 2 * BORDERPX; |
523
c1dd19da63ef
yet another simplification of dotile()
Anselm R. Garbe <arg@10kloc.org>
parents:
522
diff
changeset
|
143 if(th > bh) { |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
144 c->y += (i - nmaster) * th; |
565 | 145 c->h = th - 2 * BORDERPX; |
507 | 146 } |
531
96563762b4ad
yet another small fix and simplification of dotile
Anselm R. Garbe <arg@10kloc.org>
parents:
530
diff
changeset
|
147 else /* fallback if th < bh */ |
565 | 148 c->h = wah - 2 * BORDERPX; |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
149 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
150 resize(c, False, TopLeft); |
535 | 151 i++; |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
152 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
153 else |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
154 ban(c); |
532
651f2c868b31
code polishing, removed unnecessary newlines
Anselm R. Garbe <arg@10kloc.org>
parents:
531
diff
changeset
|
155 |
446
a2e587651c79
using a global stack for focus recovery on arrange() - seems to work great
Anselm R. Garbe <arg@10kloc.org>
parents:
443
diff
changeset
|
156 if(!sel || !isvisible(sel)) { |
450
728c9089b079
applied sanders patch of not manipulating sel
Anselm R. Garbe <arg@10kloc.org>
parents:
446
diff
changeset
|
157 for(c = stack; c && !isvisible(c); c = c->snext); |
728c9089b079
applied sanders patch of not manipulating sel
Anselm R. Garbe <arg@10kloc.org>
parents:
446
diff
changeset
|
158 focus(c); |
446
a2e587651c79
using a global stack for focus recovery on arrange() - seems to work great
Anselm R. Garbe <arg@10kloc.org>
parents:
443
diff
changeset
|
159 } |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
160 restack(); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
161 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
162 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
163 void |
461
9d23330a5268
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Anselm R. Garbe <arg@10kloc.org>
parents:
450
diff
changeset
|
164 focusnext(Arg *arg) { |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
165 Client *c; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
166 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
167 if(!sel) |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
168 return; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
169 if(!(c = getnext(sel->next))) |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
170 c = getnext(clients); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
171 if(c) { |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
172 focus(c); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
173 restack(); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
174 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
175 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
176 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
177 void |
461
9d23330a5268
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Anselm R. Garbe <arg@10kloc.org>
parents:
450
diff
changeset
|
178 focusprev(Arg *arg) { |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
179 Client *c; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
180 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
181 if(!sel) |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
182 return; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
183 if(!(c = getprev(sel->prev))) { |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
184 for(c = clients; c && c->next; c = c->next); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
185 c = getprev(c); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
186 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
187 if(c) { |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
188 focus(c); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
189 restack(); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
190 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
191 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
192 |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
193 void |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
194 incnmaster(Arg *arg) { |
656
c30805f6bb08
adding some prevention that master clients get smaller than bh
Anselm R. Garbe <arg@suckless.org>
parents:
654
diff
changeset
|
195 if(nmaster + arg->i < 1 || (wah / (nmaster + arg->i) < bh)) |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
196 return; |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
197 nmaster += arg->i; |
656
c30805f6bb08
adding some prevention that master clients get smaller than bh
Anselm R. Garbe <arg@suckless.org>
parents:
654
diff
changeset
|
198 |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
199 arrange(); |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
200 } |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
201 |
420 | 202 Bool |
461
9d23330a5268
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Anselm R. Garbe <arg@10kloc.org>
parents:
450
diff
changeset
|
203 isvisible(Client *c) { |
420 | 204 unsigned int i; |
205 | |
206 for(i = 0; i < ntags; i++) | |
207 if(c->tags[i] && seltag[i]) | |
208 return True; | |
209 return False; | |
210 } | |
211 | |
415
ad2b6ce6e95b
I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents:
414
diff
changeset
|
212 void |
559 | 213 resizemaster(Arg *arg) { |
561 | 214 if(arg->i == 0) |
215 master = MASTER; | |
216 else { | |
217 if(master + arg->i > 950 || master + arg->i < 50) | |
218 return; | |
219 master += arg->i; | |
220 } | |
533
a5567a0d3011
do* has no Arg arument anymore (never called directly)
Anselm R. Garbe <arg@10kloc.org>
parents:
532
diff
changeset
|
221 arrange(); |
415
ad2b6ce6e95b
I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents:
414
diff
changeset
|
222 } |
ad2b6ce6e95b
I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents:
414
diff
changeset
|
223 |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
224 void |
487 | 225 restack(void) { |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
226 Client *c; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
227 XEvent ev; |
481 | 228 |
437
433a5c662f73
drawstatus even if no client exists
Anselm R. Garbe <arg@10kloc.org>
parents:
436
diff
changeset
|
229 if(!sel) { |
433a5c662f73
drawstatus even if no client exists
Anselm R. Garbe <arg@10kloc.org>
parents:
436
diff
changeset
|
230 drawstatus(); |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
231 return; |
437
433a5c662f73
drawstatus even if no client exists
Anselm R. Garbe <arg@10kloc.org>
parents:
436
diff
changeset
|
232 } |
436
b3659c3c5dab
sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents:
433
diff
changeset
|
233 if(sel->isfloat || arrange == dofloat) { |
b3659c3c5dab
sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents:
433
diff
changeset
|
234 XRaiseWindow(dpy, sel->win); |
b3659c3c5dab
sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents:
433
diff
changeset
|
235 XRaiseWindow(dpy, sel->twin); |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
236 } |
512
aca04c3022c1
fixed the z-layer issue described on mailinglist
Anselm R. Garbe <arg@10kloc.org>
parents:
511
diff
changeset
|
237 if(arrange != dofloat) { |
aca04c3022c1
fixed the z-layer issue described on mailinglist
Anselm R. Garbe <arg@10kloc.org>
parents:
511
diff
changeset
|
238 if(!sel->isfloat) { |
aca04c3022c1
fixed the z-layer issue described on mailinglist
Anselm R. Garbe <arg@10kloc.org>
parents:
511
diff
changeset
|
239 XLowerWindow(dpy, sel->twin); |
aca04c3022c1
fixed the z-layer issue described on mailinglist
Anselm R. Garbe <arg@10kloc.org>
parents:
511
diff
changeset
|
240 XLowerWindow(dpy, sel->win); |
aca04c3022c1
fixed the z-layer issue described on mailinglist
Anselm R. Garbe <arg@10kloc.org>
parents:
511
diff
changeset
|
241 } |
436
b3659c3c5dab
sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents:
433
diff
changeset
|
242 for(c = nexttiled(clients); c; c = nexttiled(c->next)) { |
512
aca04c3022c1
fixed the z-layer issue described on mailinglist
Anselm R. Garbe <arg@10kloc.org>
parents:
511
diff
changeset
|
243 if(c == sel) |
aca04c3022c1
fixed the z-layer issue described on mailinglist
Anselm R. Garbe <arg@10kloc.org>
parents:
511
diff
changeset
|
244 continue; |
436
b3659c3c5dab
sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents:
433
diff
changeset
|
245 XLowerWindow(dpy, c->twin); |
b3659c3c5dab
sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents:
433
diff
changeset
|
246 XLowerWindow(dpy, c->win); |
414
c6ffcc201229
don't access sel in restack without checking for NULL (multihead crashing bug)
Anselm R. Garbe <arg@10kloc.org>
parents:
402
diff
changeset
|
247 } |
512
aca04c3022c1
fixed the z-layer issue described on mailinglist
Anselm R. Garbe <arg@10kloc.org>
parents:
511
diff
changeset
|
248 } |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
249 drawall(); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
250 XSync(dpy, False); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
251 while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
252 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
253 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
254 void |
584
37281ebc1b5b
added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
arg@mig29
parents:
573
diff
changeset
|
255 togglefloat(Arg *arg) { |
591
d9e9df9fdce6
togglefloat should only work in dotile mode (thanks to Sander for this hint)
arg@mig29
parents:
588
diff
changeset
|
256 if (!sel || arrange == dofloat) |
584
37281ebc1b5b
added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
arg@mig29
parents:
573
diff
changeset
|
257 return; |
37281ebc1b5b
added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
arg@mig29
parents:
573
diff
changeset
|
258 sel->isfloat = !sel->isfloat; |
37281ebc1b5b
added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
arg@mig29
parents:
573
diff
changeset
|
259 arrange(); |
37281ebc1b5b
added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
arg@mig29
parents:
573
diff
changeset
|
260 } |
37281ebc1b5b
added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
arg@mig29
parents:
573
diff
changeset
|
261 |
37281ebc1b5b
added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut
arg@mig29
parents:
573
diff
changeset
|
262 void |
461
9d23330a5268
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Anselm R. Garbe <arg@10kloc.org>
parents:
450
diff
changeset
|
263 togglemode(Arg *arg) { |
333
827f8f6c9e97
separated setup stuff into main.c:setup() - this makes main() more readable
Anselm R. Garbe <arg@10kloc.org>
parents:
327
diff
changeset
|
264 arrange = (arrange == dofloat) ? dotile : dofloat; |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
265 if(sel) |
533
a5567a0d3011
do* has no Arg arument anymore (never called directly)
Anselm R. Garbe <arg@10kloc.org>
parents:
532
diff
changeset
|
266 arrange(); |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
267 else |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
268 drawstatus(); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
269 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
270 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
271 void |
461
9d23330a5268
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Anselm R. Garbe <arg@10kloc.org>
parents:
450
diff
changeset
|
272 toggleview(Arg *arg) { |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
273 unsigned int i; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
274 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
275 seltag[arg->i] = !seltag[arg->i]; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
276 for(i = 0; i < ntags && !seltag[i]; i++); |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
277 if(i == ntags) |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
278 seltag[arg->i] = True; /* cannot toggle last view */ |
533
a5567a0d3011
do* has no Arg arument anymore (never called directly)
Anselm R. Garbe <arg@10kloc.org>
parents:
532
diff
changeset
|
279 arrange(); |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
280 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
281 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
282 void |
461
9d23330a5268
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Anselm R. Garbe <arg@10kloc.org>
parents:
450
diff
changeset
|
283 view(Arg *arg) { |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
284 unsigned int i; |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
285 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
286 for(i = 0; i < ntags; i++) |
594
f7dcd3ac8d6f
removed viewall(), replaced with view(-1); added tag(-1) to tag a client with all tags (new key combo MODKEY-Shift-0)
arg@mig29
parents:
591
diff
changeset
|
287 seltag[i] = (arg->i == -1) ? True : False; |
611 | 288 if(arg->i >= 0 && arg->i < ntags) |
289 seltag[arg->i] = True; | |
533
a5567a0d3011
do* has no Arg arument anymore (never called directly)
Anselm R. Garbe <arg@10kloc.org>
parents:
532
diff
changeset
|
290 arrange(); |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
291 } |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
292 |
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
293 void |
461
9d23330a5268
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Anselm R. Garbe <arg@10kloc.org>
parents:
450
diff
changeset
|
294 zoom(Arg *arg) { |
651
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
295 unsigned int n; |
423
6ba5dd429122
applied checking existance of >2 tiles patch (proposed by sander) to zoom and resizecol
Anselm R. Garbe <arg@10kloc.org>
parents:
422
diff
changeset
|
296 Client *c; |
473
2d8af0d7920d
implemented the maximization as I described on the mailinglist, this feels better to me.
arg@mmvi
parents:
463
diff
changeset
|
297 |
2d8af0d7920d
implemented the maximization as I described on the mailinglist, this feels better to me.
arg@mmvi
parents:
463
diff
changeset
|
298 if(!sel) |
2d8af0d7920d
implemented the maximization as I described on the mailinglist, this feels better to me.
arg@mmvi
parents:
463
diff
changeset
|
299 return; |
2d8af0d7920d
implemented the maximization as I described on the mailinglist, this feels better to me.
arg@mmvi
parents:
463
diff
changeset
|
300 if(sel->isfloat || (arrange == dofloat)) { |
480 | 301 togglemax(sel); |
473
2d8af0d7920d
implemented the maximization as I described on the mailinglist, this feels better to me.
arg@mmvi
parents:
463
diff
changeset
|
302 return; |
2d8af0d7920d
implemented the maximization as I described on the mailinglist, this feels better to me.
arg@mmvi
parents:
463
diff
changeset
|
303 } |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
304 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) |
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
305 n++; |
654
04734db9a219
allowing zoom within master area as well
Anselm R. Garbe <arg@suckless.org>
parents:
651
diff
changeset
|
306 |
04734db9a219
allowing zoom within master area as well
Anselm R. Garbe <arg@suckless.org>
parents:
651
diff
changeset
|
307 c = sel; |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
308 if(n <= nmaster || (arrange == dofloat)) |
654
04734db9a219
allowing zoom within master area as well
Anselm R. Garbe <arg@suckless.org>
parents:
651
diff
changeset
|
309 pop(c); |
04734db9a219
allowing zoom within master area as well
Anselm R. Garbe <arg@suckless.org>
parents:
651
diff
changeset
|
310 else if(ismaster(sel)) { |
651
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
311 if(!(c = topofstack())) |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
312 return; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
313 swap(c, sel); |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
314 c = sel; |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
315 } |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
316 else |
b9f4efd21473
added MODKEY-{plus,minus} shortcuts (increasing/decreasing master clients)
Anselm R. Garbe <arg@suckless.org>
parents:
650
diff
changeset
|
317 pop(c); |
650
f3b8c71a69d4
experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents:
644
diff
changeset
|
318 |
378
83576f5f0a90
added attach/detach functions which don't attach at the begin of list, but at the slot of a first match of the tags of a client
Anselm R. Garbe <arg@10kloc.org>
parents:
342
diff
changeset
|
319 focus(c); |
533
a5567a0d3011
do* has no Arg arument anymore (never called directly)
Anselm R. Garbe <arg@10kloc.org>
parents:
532
diff
changeset
|
320 arrange(); |
327
96d09fd98e89
separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff
changeset
|
321 } |