Mercurial > dwm-meillo
annotate tag.c @ 144:e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
author | arg@10ksloc.org |
---|---|
date | Tue, 01 Aug 2006 12:39:14 +0200 |
parents | 36cabfe408cd |
children | f328ce9c558c |
rev | line source |
---|---|
75 | 1 /* |
2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> | |
3 * See LICENSE file for license details. | |
4 */ | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
5 #include "dwm.h" |
75 | 6 |
114 | 7 #include <regex.h> |
8 #include <stdio.h> | |
75 | 9 #include <string.h> |
114 | 10 #include <sys/types.h> |
75 | 11 #include <X11/Xutil.h> |
12 | |
84
052fe7498930
ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents:
80
diff
changeset
|
13 /* static */ |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
14 |
114 | 15 typedef struct { |
16 const char *pattern; | |
17 char *tags[TLast]; | |
18 Bool isfloat; | |
19 } Rule; | |
20 | |
84
052fe7498930
ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents:
80
diff
changeset
|
21 /* CUSTOMIZE */ |
052fe7498930
ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents:
80
diff
changeset
|
22 static Rule rule[] = { |
123 | 23 /* class:instance tags isfloat */ |
130
30d1302dbe3b
sanitization of several clunky stuff, removed heretag (rarely of use), simplified pop(), changed shortcuts to always contain MODKEY
arg@10ksloc.org
parents:
127
diff
changeset
|
24 { "Firefox.*", { [Tnet] = "net" }, False }, |
123 | 25 { "Gimp.*", { 0 }, True}, |
84
052fe7498930
ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents:
80
diff
changeset
|
26 }; |
052fe7498930
ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents:
80
diff
changeset
|
27 |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
28 char *tags[TLast] = { |
130
30d1302dbe3b
sanitization of several clunky stuff, removed heretag (rarely of use), simplified pop(), changed shortcuts to always contain MODKEY
arg@10ksloc.org
parents:
127
diff
changeset
|
29 [Tfnord] = "fnord", |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
30 [Tdev] = "dev", |
130
30d1302dbe3b
sanitization of several clunky stuff, removed heretag (rarely of use), simplified pop(), changed shortcuts to always contain MODKEY
arg@10ksloc.org
parents:
127
diff
changeset
|
31 [Tnet] = "net", |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
32 [Twork] = "work", |
130
30d1302dbe3b
sanitization of several clunky stuff, removed heretag (rarely of use), simplified pop(), changed shortcuts to always contain MODKEY
arg@10ksloc.org
parents:
127
diff
changeset
|
33 [Tmisc] = "misc", |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
34 }; |
125 | 35 |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
36 void (*arrange)(Arg *) = dotile; |
75 | 37 |
125 | 38 /* END CUSTOMIZE */ |
39 | |
40 /* extern */ | |
41 | |
75 | 42 void |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
43 appendtag(Arg *arg) |
75 | 44 { |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
45 if(!sel) |
75 | 46 return; |
47 | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
48 sel->tags[arg->i] = tags[arg->i]; |
75 | 49 arrange(NULL); |
50 } | |
51 | |
52 void | |
53 dofloat(Arg *arg) | |
54 { | |
55 Client *c; | |
56 | |
57 for(c = clients; c; c = c->next) { | |
124
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
58 c->ismax = False; |
95
5d88952cbf96
implemened distinguishing float/managed geometries of clients (works quite well)
Anselm R. Garbe <garbeam@wmii.de>
parents:
94
diff
changeset
|
59 if(c->tags[tsel]) { |
99
a19556fe83b5
applied Sanders resize patch, fixed lower bug
arg@10ksloc.org
parents:
97
diff
changeset
|
60 resize(c, True, TopLeft); |
95
5d88952cbf96
implemened distinguishing float/managed geometries of clients (works quite well)
Anselm R. Garbe <garbeam@wmii.de>
parents:
94
diff
changeset
|
61 } |
75 | 62 else |
63 ban(c); | |
64 } | |
65 if(sel && !sel->tags[tsel]) { | |
142
9b9deafa0508
committed a patch which fixes the hints of Jukka
arg@10ksloc.org
parents:
138
diff
changeset
|
66 if((sel = getnext(clients))) { |
75 | 67 higher(sel); |
68 focus(sel); | |
69 } | |
143 | 70 else |
71 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | |
75 | 72 } |
73 drawall(); | |
74 } | |
75 | |
76 void | |
77 dotile(Arg *arg) | |
78 { | |
123 | 79 int n, i, w, h; |
75 | 80 Client *c; |
81 | |
82 w = sw - mw; | |
83 for(n = 0, c = clients; c; c = c->next) | |
80
8125f908c80c
several additions in mouse handling ;)
Anselm R. Garbe <garbeam@wmii.de>
parents:
76
diff
changeset
|
84 if(c->tags[tsel] && !c->isfloat) |
75 | 85 n++; |
86 | |
87 if(n > 1) | |
88 h = (sh - bh) / (n - 1); | |
89 else | |
90 h = sh - bh; | |
91 | |
92 for(i = 0, c = clients; c; c = c->next) { | |
124
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
93 c->ismax = False; |
75 | 94 if(c->tags[tsel]) { |
80
8125f908c80c
several additions in mouse handling ;)
Anselm R. Garbe <garbeam@wmii.de>
parents:
76
diff
changeset
|
95 if(c->isfloat) { |
75 | 96 higher(c); |
99
a19556fe83b5
applied Sanders resize patch, fixed lower bug
arg@10ksloc.org
parents:
97
diff
changeset
|
97 resize(c, True, TopLeft); |
75 | 98 continue; |
99 } | |
100 if(n == 1) { | |
115
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
101 c->x = sx; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
102 c->y = sy + bh; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
103 c->w = sw - 2 * c->border; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
104 c->h = sh - 2 * c->border - bh; |
75 | 105 } |
106 else if(i == 0) { | |
115
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
107 c->x = sx; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
108 c->y = sy + bh; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
109 c->w = mw - 2 * c->border; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
110 c->h = sh - 2 * c->border - bh; |
75 | 111 } |
104
3a708f113f55
implemented fallback for too many clients in stacked mode
arg@10ksloc.org
parents:
99
diff
changeset
|
112 else if(h > bh) { |
115
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
113 c->x = sx + mw; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
114 c->y = sy + (i - 1) * h + bh; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
115 c->w = w - 2 * c->border; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
116 c->h = h - 2 * c->border; |
75 | 117 } |
104
3a708f113f55
implemented fallback for too many clients in stacked mode
arg@10ksloc.org
parents:
99
diff
changeset
|
118 else { /* fallback if h < bh */ |
115
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
119 c->x = sx + mw; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
120 c->y = sy + bh; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
121 c->w = w - 2 * c->border; |
329fd7dae530
removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents:
114
diff
changeset
|
122 c->h = sh - 2 * c->border - bh; |
104
3a708f113f55
implemented fallback for too many clients in stacked mode
arg@10ksloc.org
parents:
99
diff
changeset
|
123 } |
99
a19556fe83b5
applied Sanders resize patch, fixed lower bug
arg@10ksloc.org
parents:
97
diff
changeset
|
124 resize(c, False, TopLeft); |
75 | 125 i++; |
126 } | |
127 else | |
128 ban(c); | |
129 } | |
130 if(!sel || (sel && !sel->tags[tsel])) { | |
142
9b9deafa0508
committed a patch which fixes the hints of Jukka
arg@10ksloc.org
parents:
138
diff
changeset
|
131 if((sel = getnext(clients))) { |
75 | 132 higher(sel); |
133 focus(sel); | |
134 } | |
143 | 135 else |
136 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); | |
75 | 137 } |
138 drawall(); | |
139 } | |
140 | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
141 Client * |
142
9b9deafa0508
committed a patch which fixes the hints of Jukka
arg@10ksloc.org
parents:
138
diff
changeset
|
142 getnext(Client *c) |
93
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
143 { |
142
9b9deafa0508
committed a patch which fixes the hints of Jukka
arg@10ksloc.org
parents:
138
diff
changeset
|
144 for(; c && !c->tags[tsel]; c = c->next); |
93
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
145 return c; |
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
146 } |
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
147 |
127
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
148 Client * |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
149 getprev(Client *c) |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
150 { |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
151 for(; c && !c->tags[tsel]; c = c->prev); |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
152 return c; |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
153 } |
1480e19f6377
using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents:
125
diff
changeset
|
154 |
93
c498da7520c7
added heretag command which allows to tag a client of a foreign tag with current tag
Anselm R. Garbe <garbeam@wmii.de>
parents:
84
diff
changeset
|
155 void |
75 | 156 replacetag(Arg *arg) |
157 { | |
158 int i; | |
123 | 159 |
75 | 160 if(!sel) |
161 return; | |
162 | |
163 for(i = 0; i < TLast; i++) | |
164 sel->tags[i] = NULL; | |
165 appendtag(arg); | |
166 } | |
167 | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
168 void |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
169 settags(Client *c) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
170 { |
114 | 171 char classinst[256]; |
138
c1185dc7a36e
some cleanups/fixes inspired by Jukka Salmi's feedback
arg@10ksloc.org
parents:
130
diff
changeset
|
172 static unsigned int len = sizeof(rule) / sizeof(rule[0]); |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
173 unsigned int i, j; |
114 | 174 regex_t regex; |
175 regmatch_t tmp; | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
176 Bool matched = False; |
114 | 177 XClassHint ch; |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
178 |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
179 if(XGetClassHint(dpy, c->win, &ch)) { |
114 | 180 snprintf(classinst, sizeof(classinst), "%s:%s", |
181 ch.res_class ? ch.res_class : "", | |
182 ch.res_name ? ch.res_name : ""); | |
183 for(i = 0; !matched && i < len; i++) { | |
184 if(!regcomp(®ex, rule[i].pattern, 0)) { | |
185 if(!regexec(®ex, classinst, 1, &tmp, 0)) { | |
186 for(j = 0; j < TLast; j++) { | |
187 if(rule[i].tags[j]) | |
188 matched = True; | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
189 c->tags[j] = rule[i].tags[j]; |
114 | 190 } |
80
8125f908c80c
several additions in mouse handling ;)
Anselm R. Garbe <garbeam@wmii.de>
parents:
76
diff
changeset
|
191 c->isfloat = rule[i].isfloat; |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
192 } |
114 | 193 regfree(®ex); |
194 } | |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
195 } |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
196 if(ch.res_class) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
197 XFree(ch.res_class); |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
198 if(ch.res_name) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
199 XFree(ch.res_name); |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
200 } |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
201 if(!matched) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
202 c->tags[tsel] = tags[tsel]; |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
203 } |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
204 |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
205 void |
124
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
206 togglemode(Arg *arg) |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
207 { |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
208 arrange = arrange == dofloat ? dotile : dofloat; |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
209 arrange(NULL); |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
210 } |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
211 |
75576e44c1d8
made status bar drawing more robust, implemented togglemax and togglemode, works quite well
arg@10ksloc.org
parents:
123
diff
changeset
|
212 void |
76
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
213 view(Arg *arg) |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
214 { |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
215 tsel = arg->i; |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
216 arrange(NULL); |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
217 drawall(); |
4bd49f404f10
proceeded with cleaning up, sorting functions, etc
Anselm R. Garbe <garbeam@wmii.de>
parents:
75
diff
changeset
|
218 } |
144
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
219 |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
220 void |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
221 viewnext(Arg *arg) |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
222 { |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
223 arg->i = (tsel < TLast-1) ? tsel+1 : 0; |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
224 view(arg); |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
225 } |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
226 |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
227 void |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
228 viewprev(Arg *arg) |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
229 { |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
230 arg->i = (tsel > 0) ? tsel-1 : TLast-1; |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
231 view(arg); |
e61447a7f249
applied Jukkas prev/next patch with XK_{h,l}
arg@10ksloc.org
parents:
143
diff
changeset
|
232 } |