summaryrefslogtreecommitdiffstats
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--view.c (renamed from manage.c)74
1 files changed, 0 insertions, 74 deletions
diff --git a/manage.c b/view.c
index 9db139b..34aae58 100644
--- a/manage.c
+++ b/view.c
@@ -59,20 +59,6 @@ togglemax(Client *c) {
59/* extern */ 59/* extern */
60 60
61void 61void
62attach(Client *c) {
63 if(clients)
64 clients->prev = c;
65 c->next = clients;
66 clients = c;
67}
68
69void
70attachstack(Client *c) {
71 c->snext = stack;
72 stack = c;
73}
74
75void
76compileregexps(void) { 62compileregexps(void) {
77 unsigned int i; 63 unsigned int i;
78 regex_t *reg; 64 regex_t *reg;
@@ -100,24 +86,6 @@ compileregexps(void) {
100} 86}
101 87
102void 88void
103detach(Client *c) {
104 if(c->prev)
105 c->prev->next = c->next;
106 if(c->next)
107 c->next->prev = c->prev;
108 if(c == clients)
109 clients = c->next;
110 c->next = c->prev = NULL;
111}
112
113void
114detachstack(Client *c) {
115 Client **tc;
116 for(tc=&stack; *tc && *tc != c; tc=&(*tc)->snext);
117 *tc = c->snext;
118}
119
120void
121dofloat(void) { 89dofloat(void) {
122 Client *c; 90 Client *c;
123 91
@@ -192,48 +160,6 @@ dotile(void) {
192} 160}
193 161
194void 162void
195focusnext(Arg *arg) {
196 Client *c;
197
198 if(!sel)
199 return;
200 for(c = sel->next; c && !isvisible(c); c = c->next);
201 if(!c)
202 for(c = clients; c && !isvisible(c); c = c->next);
203 if(c) {
204 focus(c);
205 restack();
206 }
207}
208
209void
210focusprev(Arg *arg) {
211 Client *c;
212
213 if(!sel)
214 return;
215 for(c = sel->prev; c && !isvisible(c); c = c->prev);
216 if(!c) {
217 for(c = clients; c && c->next; c = c->next);
218 for(; c && !isvisible(c); c = c->prev);
219 }
220 if(c) {
221 focus(c);
222 restack();
223 }
224}
225
226Client *
227getclient(Window w) {
228 Client *c;
229
230 for(c = clients; c; c = c->next)
231 if(c->win == w)
232 return c;
233 return NULL;
234}
235
236void
237incnmaster(Arg *arg) { 163incnmaster(Arg *arg) {
238 if((arrange == dofloat) || (nmaster + arg->i < 1) 164 if((arrange == dofloat) || (nmaster + arg->i < 1)
239 || (wah / (nmaster + arg->i) <= 2 * BORDERPX)) 165 || (wah / (nmaster + arg->i) <= 2 * BORDERPX))