annotate view.c @ 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)
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 12 Sep 2006 10:57:28 +0200
parents 728c9089b079
children e93b0ad5aeb5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
1 /*
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
3 * See LICENSE file for license details.
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
4 */
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
5 #include "dwm.h"
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
6 #include <stdio.h>
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
7
380
4bf79305d675 this algorithm seems to keep order for any scenario
Anselm R. Garbe <arg@10kloc.org>
parents: 378
diff changeset
8 /* static */
4bf79305d675 this algorithm seems to keep order for any scenario
Anselm R. Garbe <arg@10kloc.org>
parents: 378
diff changeset
9
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
10 static Client *
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
11 minclient() {
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
12 Client *c, *min;
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
13
443
548084f8d92e this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
Anselm R. Garbe <arg@10kloc.org>
parents: 442
diff changeset
14 if((clients && clients->isfloat) || arrange == dofloat)
548084f8d92e this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
Anselm R. Garbe <arg@10kloc.org>
parents: 442
diff changeset
15 return clients; /* don't touch floating order */
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
16 for(min = c = clients; c; c = c->next)
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
17 if(c->weight < min->weight)
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
18 min = c;
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
19 return min;
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
20 }
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
21
442
056a5072c70a no this is better
Anselm R. Garbe <arg@10kloc.org>
parents: 437
diff changeset
22 static 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
23 reorder() {
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
24 Client *c, *newclients, *tail;
381
b00cc483d13b still something wrong with reorder()
Anselm R. Garbe <arg@10kloc.org>
parents: 380
diff changeset
25
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
26 newclients = tail = NULL;
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
27 while((c = minclient())) {
381
b00cc483d13b still something wrong with reorder()
Anselm R. Garbe <arg@10kloc.org>
parents: 380
diff changeset
28 detach(c);
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
29 if(tail) {
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
30 c->prev = tail;
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
31 tail->next = c;
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
32 tail = c;
381
b00cc483d13b still something wrong with reorder()
Anselm R. Garbe <arg@10kloc.org>
parents: 380
diff changeset
33 }
b00cc483d13b still something wrong with reorder()
Anselm R. Garbe <arg@10kloc.org>
parents: 380
diff changeset
34 else
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
35 tail = newclients = c;
380
4bf79305d675 this algorithm seems to keep order for any scenario
Anselm R. Garbe <arg@10kloc.org>
parents: 378
diff changeset
36 }
382
76b62c0c8c11 improved selection policy
Anselm R. Garbe <arg@10kloc.org>
parents: 381
diff changeset
37 clients = newclients;
380
4bf79305d675 this algorithm seems to keep order for any scenario
Anselm R. Garbe <arg@10kloc.org>
parents: 378
diff changeset
38 }
4bf79305d675 this algorithm seems to keep order for any scenario
Anselm R. Garbe <arg@10kloc.org>
parents: 378
diff changeset
39
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
40 static Client *
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
41 nexttiled(Client *c) {
433
a6b8994af164 small fix
Anselm R. Garbe <arg@10kloc.org>
parents: 430
diff changeset
42 for(c = getnext(c); c && c->isfloat; c = getnext(c->next));
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
43 return c;
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
44 }
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
45
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
46 /* extern */
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
47
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
48 void (*arrange)(Arg *) = DEFMODE;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
49
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
50 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
51 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
52 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
53 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
54 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
55 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
56 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
57 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
58 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
59 }
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
60
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
61 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
62 dofloat(Arg *arg) {
402
c7d5ff57998d removed unused vars
Anselm R. Garbe <arg@10kloc.org>
parents: 401
diff changeset
63 Client *c;
400
052657ff2e7b applied Sanders max_and_focus.patch
Anselm R. Garbe <arg@10kloc.org>
parents: 397
diff changeset
64
052657ff2e7b applied Sanders max_and_focus.patch
Anselm R. Garbe <arg@10kloc.org>
parents: 397
diff changeset
65 maximized = False;
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
66
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
67 for(c = clients; c; c = c->next) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
68 if(isvisible(c)) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
69 resize(c, True, TopLeft);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
70 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
71 else
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
72 ban(c);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
73 }
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
74 if(!sel || !isvisible(sel)) {
450
728c9089b079 applied sanders patch of not manipulating sel
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
75 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
76 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
77 }
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
78 restack();
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
79 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
80
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
81 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
82 dotile(Arg *arg) {
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
83 int h, i, n, w;
402
c7d5ff57998d removed unused vars
Anselm R. Garbe <arg@10kloc.org>
parents: 401
diff changeset
84 Client *c;
400
052657ff2e7b applied Sanders max_and_focus.patch
Anselm R. Garbe <arg@10kloc.org>
parents: 397
diff changeset
85
052657ff2e7b applied Sanders max_and_focus.patch
Anselm R. Garbe <arg@10kloc.org>
parents: 397
diff changeset
86 maximized = False;
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
87
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
88 w = sw - mw;
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
89 for(n = 0, c = clients; c; c = c->next)
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
90 if(isvisible(c) && !c->isfloat)
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
91 n++;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
92
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
93 if(n > 1)
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
94 h = (sh - bh) / (n - 1);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
95 else
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
96 h = sh - bh;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
97
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
98 for(i = 0, c = clients; c; c = c->next) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
99 if(isvisible(c)) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
100 if(c->isfloat) {
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 continue;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
103 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
104 if(n == 1) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
105 c->x = sx;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
106 c->y = sy + bh;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
107 c->w = sw - 2;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
108 c->h = sh - 2 - bh;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
109 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
110 else if(i == 0) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
111 c->x = sx;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
112 c->y = sy + bh;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
113 c->w = mw - 2;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
114 c->h = sh - 2 - bh;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
115 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
116 else if(h > bh) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
117 c->x = sx + mw;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
118 c->y = sy + (i - 1) * h + bh;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
119 c->w = w - 2;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
120 if(i + 1 == n)
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
121 c->h = sh - c->y - 2;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
122 else
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
123 c->h = h - 2;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
124 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
125 else { /* fallback if h < bh */
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
126 c->x = sx + mw;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
127 c->y = sy + bh;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
128 c->w = w - 2;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
129 c->h = sh - 2 - bh;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
130 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
131 resize(c, False, TopLeft);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
132 i++;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
133 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
134 else
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
135 ban(c);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
136 }
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
137 if(!sel || !isvisible(sel)) {
450
728c9089b079 applied sanders patch of not manipulating sel
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
138 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
139 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
140 }
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
141 restack();
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
142 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
143
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
144 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
145 focusnext(Arg *arg) {
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
146 Client *c;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
147
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
148 if(!sel)
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
149 return;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
150
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
151 if(!(c = getnext(sel->next)))
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
152 c = getnext(clients);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
153 if(c) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
154 focus(c);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
155 restack();
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
156 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
157 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
158
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
159 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
160 focusprev(Arg *arg) {
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
161 Client *c;
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 if(!sel)
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
164 return;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
165
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
166 if(!(c = getprev(sel->prev))) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
167 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
168 c = getprev(c);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
169 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
170 if(c) {
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
171 focus(c);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
172 restack();
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
173 }
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
420
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
176 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
177 isvisible(Client *c) {
420
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
178 unsigned int i;
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
179
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
180 for(i = 0; i < ntags; i++)
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
181 if(c->tags[i] && seltag[i])
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
182 return True;
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
183 return False;
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
184 }
c033e1ade281 s/growcol/resizetile/g
Anselm R. Garbe <arg@10kloc.org>
parents: 419
diff changeset
185
415
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
186 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
187 resizecol(Arg *arg) {
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
188 unsigned int n;
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
189 Client *c;
418
Anselm R. Garbe <arg@10kloc.org>
parents: 417
diff changeset
190
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
191 for(n = 0, c = clients; c; c = c->next)
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
192 if(isvisible(c) && !c->isfloat)
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
193 n++;
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
194 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
415
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
195 return;
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
196
415
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
197 if(sel == getnext(clients)) {
425
67f37b93ac73 fixing two off-by-ones
Anselm R. Garbe <arg@10kloc.org>
parents: 423
diff changeset
198 if(mw + arg->i > sw - 100 || mw + arg->i < 100)
415
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
199 return;
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
200 mw += arg->i;
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
201 }
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
202 else {
425
67f37b93ac73 fixing two off-by-ones
Anselm R. Garbe <arg@10kloc.org>
parents: 423
diff changeset
203 if(mw - arg->i > sw - 100 || mw - arg->i < 100)
415
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
204 return;
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
205 mw -= arg->i;
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
206 }
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
207 arrange(NULL);
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
208 }
ad2b6ce6e95b I really need column growing, now pushing upstream
Anselm R. Garbe <arg@10kloc.org>
parents: 414
diff changeset
209
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
210 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
211 restack() {
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
212 Client *c;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
213 XEvent ev;
436
b3659c3c5dab sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents: 433
diff changeset
214
437
433a5c662f73 drawstatus even if no client exists
Anselm R. Garbe <arg@10kloc.org>
parents: 436
diff changeset
215 if(!sel) {
433a5c662f73 drawstatus even if no client exists
Anselm R. Garbe <arg@10kloc.org>
parents: 436
diff changeset
216 drawstatus();
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
217 return;
437
433a5c662f73 drawstatus even if no client exists
Anselm R. Garbe <arg@10kloc.org>
parents: 436
diff changeset
218 }
436
b3659c3c5dab sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents: 433
diff changeset
219 if(sel->isfloat || arrange == dofloat) {
b3659c3c5dab sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents: 433
diff changeset
220 XRaiseWindow(dpy, sel->win);
b3659c3c5dab sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents: 433
diff changeset
221 XRaiseWindow(dpy, sel->twin);
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
222 }
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
223 if(arrange != dofloat)
436
b3659c3c5dab sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents: 433
diff changeset
224 for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
b3659c3c5dab sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents: 433
diff changeset
225 XLowerWindow(dpy, c->twin);
b3659c3c5dab sanders solution is convincing and elegant
Anselm R. Garbe <arg@10kloc.org>
parents: 433
diff changeset
226 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
227 }
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
228 drawall();
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
229 XSync(dpy, False);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
230 while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
231 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
232
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
233 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
234 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
235 arrange = (arrange == dofloat) ? dotile : dofloat;
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
236 if(sel)
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
237 arrange(NULL);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
238 else
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
239 drawstatus();
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
240 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
241
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
242 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
243 toggleview(Arg *arg) {
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
244 unsigned int i;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
245
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
246 seltag[arg->i] = !seltag[arg->i];
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
247 for(i = 0; i < ntags && !seltag[i]; i++);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
248 if(i == ntags)
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
249 seltag[arg->i] = True; /* cannot toggle last view */
381
b00cc483d13b still something wrong with reorder()
Anselm R. Garbe <arg@10kloc.org>
parents: 380
diff changeset
250 reorder();
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
251 arrange(NULL);
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
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
255 view(Arg *arg) {
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
256 unsigned int i;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
257
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
258 for(i = 0; i < ntags; i++)
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
259 seltag[i] = False;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
260 seltag[arg->i] = True;
381
b00cc483d13b still something wrong with reorder()
Anselm R. Garbe <arg@10kloc.org>
parents: 380
diff changeset
261 reorder();
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
262 arrange(NULL);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
263 }
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
264
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
265 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
266 viewall(Arg *arg) {
395
7528080beb0e added viewall to mainstream (only Ross Mohns version, not the toggle)
Anselm R. Garbe <arg@10kloc.org>
parents: 393
diff changeset
267 unsigned int i;
7528080beb0e added viewall to mainstream (only Ross Mohns version, not the toggle)
Anselm R. Garbe <arg@10kloc.org>
parents: 393
diff changeset
268
7528080beb0e added viewall to mainstream (only Ross Mohns version, not the toggle)
Anselm R. Garbe <arg@10kloc.org>
parents: 393
diff changeset
269 for(i = 0; i < ntags; i++)
7528080beb0e added viewall to mainstream (only Ross Mohns version, not the toggle)
Anselm R. Garbe <arg@10kloc.org>
parents: 393
diff changeset
270 seltag[i] = True;
397
cb8a231610c7 reorder was misssing in Ross version of viewall
Anselm R. Garbe <arg@10kloc.org>
parents: 395
diff changeset
271 reorder();
395
7528080beb0e added viewall to mainstream (only Ross Mohns version, not the toggle)
Anselm R. Garbe <arg@10kloc.org>
parents: 393
diff changeset
272 arrange(NULL);
7528080beb0e added viewall to mainstream (only Ross Mohns version, not the toggle)
Anselm R. Garbe <arg@10kloc.org>
parents: 393
diff changeset
273 }
7528080beb0e added viewall to mainstream (only Ross Mohns version, not the toggle)
Anselm R. Garbe <arg@10kloc.org>
parents: 393
diff changeset
274
7528080beb0e added viewall to mainstream (only Ross Mohns version, not the toggle)
Anselm R. Garbe <arg@10kloc.org>
parents: 393
diff changeset
275 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
276 zoom(Arg *arg) {
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
277 unsigned int n;
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
278 Client *c;
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
279
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
280 for(n = 0, c = clients; c; c = c->next)
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
281 if(isvisible(c) && !c->isfloat)
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
282 n++;
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
283 if(!sel || sel->isfloat || n < 2 || (arrange != dotile) || maximized)
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
284 return;
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
285
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
286 if((c = sel) == nexttiled(clients))
433
a6b8994af164 small fix
Anselm R. Garbe <arg@10kloc.org>
parents: 430
diff changeset
287 if(!(c = nexttiled(c->next)))
429
a31de8605f72 no, ordering floating clients at the end seems better
Anselm R. Garbe <arg@10kloc.org>
parents: 428
diff changeset
288 return;
443
548084f8d92e this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
Anselm R. Garbe <arg@10kloc.org>
parents: 442
diff changeset
289 detach(c);
548084f8d92e this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
Anselm R. Garbe <arg@10kloc.org>
parents: 442
diff changeset
290 if(clients)
548084f8d92e this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
Anselm R. Garbe <arg@10kloc.org>
parents: 442
diff changeset
291 clients->prev = c;
548084f8d92e this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
Anselm R. Garbe <arg@10kloc.org>
parents: 442
diff changeset
292 c->next = clients;
548084f8d92e this patch keeps track of global z-layer order of clients which are floating or if floating mode is enabled
Anselm R. Garbe <arg@10kloc.org>
parents: 442
diff changeset
293 clients = 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
294 focus(c);
327
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
295 arrange(NULL);
96d09fd98e89 separated several functions into view.c
Anselm R. Garbe <arg@10kloc.org>
parents:
diff changeset
296 }