summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-02-19 17:18:24 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-02-19 17:18:24 +0100
commit5a03daf47f3383250652c15f38f976f6157b4641 (patch)
tree3fa10743e82f60e66a0407056a4793101e917a74
parentrenames swim[ming] into versatile (diff)
downloaddwm-5a03daf47f3383250652c15f38f976f6157b4641.tar.gz
dwm-5a03daf47f3383250652c15f38f976f6157b4641.zip
renamed Client->versatile and Rule->versatile into Client->isversatile resp. Rule->isversatile
-rw-r--r--client.c8
-rw-r--r--config.arg.h2
-rw-r--r--dwm.h2
-rw-r--r--event.c8
-rw-r--r--screen.c12
5 files changed, 16 insertions, 16 deletions
diff --git a/client.c b/client.c
index 2aa1955..fdb973c 100644
--- a/client.c
+++ b/client.c
@@ -253,8 +253,8 @@ manage(Window w, XWindowAttributes *wa) {
253 updatetitle(c); 253 updatetitle(c);
254 for(t = clients; t && t->win != trans; t = t->next); 254 for(t = clients; t && t->win != trans; t = t->next);
255 settags(c, t); 255 settags(c, t);
256 if(!c->versatile) 256 if(!c->isversatile)
257 c->versatile = (t != NULL) || c->isfixed; 257 c->isversatile = (t != NULL) || c->isfixed;
258 attach(c); 258 attach(c);
259 attachstack(c); 259 attachstack(c);
260 c->isbanned = True; 260 c->isbanned = True;
@@ -268,7 +268,7 @@ manage(Window w, XWindowAttributes *wa) {
268 268
269Client * 269Client *
270nexttiled(Client *c) { 270nexttiled(Client *c) {
271 for(; c && (c->versatile || !isvisible(c)); c = c->next); 271 for(; c && (c->isversatile || !isvisible(c)); c = c->next);
272 return c; 272 return c;
273} 273}
274 274
@@ -440,7 +440,7 @@ zoom(Arg *arg) {
440 440
441 if(!sel) 441 if(!sel)
442 return; 442 return;
443 if(sel->versatile || (lt->arrange == versatile)) { 443 if(sel->isversatile || (lt->arrange == versatile)) {
444 togglemax(sel); 444 togglemax(sel);
445 return; 445 return;
446 } 446 }
diff --git a/config.arg.h b/config.arg.h
index 05bcd07..fec7a12 100644
--- a/config.arg.h
+++ b/config.arg.h
@@ -89,7 +89,7 @@ static Key key[] = { \
89 89
90#define RULES \ 90#define RULES \
91static Rule rule[] = { \ 91static Rule rule[] = { \
92 /* class:instance:title regex tags regex versatile */ \ 92 /* class:instance:title regex tags regex isversatile */ \
93 { "Firefox", "3", False }, \ 93 { "Firefox", "3", False }, \
94 { "Gimp", NULL, True }, \ 94 { "Gimp", NULL, True }, \
95 { "MPlayer", NULL, True }, \ 95 { "MPlayer", NULL, True }, \
diff --git a/dwm.h b/dwm.h
index 8e68776..c8546d8 100644
--- a/dwm.h
+++ b/dwm.h
@@ -72,7 +72,7 @@ struct Client {
72 int minax, minay, maxax, maxay; 72 int minax, minay, maxax, maxay;
73 long flags; 73 long flags;
74 unsigned int border; 74 unsigned int border;
75 Bool isbanned, isfixed, ismax, versatile; 75 Bool isbanned, isfixed, ismax, isversatile;
76 Bool *tags; 76 Bool *tags;
77 Client *next; 77 Client *next;
78 Client *prev; 78 Client *prev;
diff --git a/event.c b/event.c
index 00c53b6..b6a77fd 100644
--- a/event.c
+++ b/event.c
@@ -156,14 +156,14 @@ buttonpress(XEvent *e) {
156 focus(c); 156 focus(c);
157 if(CLEANMASK(ev->state) != MODKEY) 157 if(CLEANMASK(ev->state) != MODKEY)
158 return; 158 return;
159 if(ev->button == Button1 && (lt->arrange == versatile || c->versatile)) { 159 if(ev->button == Button1 && (lt->arrange == versatile || c->isversatile)) {
160 restack(); 160 restack();
161 movemouse(c); 161 movemouse(c);
162 } 162 }
163 else if(ev->button == Button2) 163 else if(ev->button == Button2)
164 zoom(NULL); 164 zoom(NULL);
165 else if(ev->button == Button3 165 else if(ev->button == Button3
166 && (lt->arrange == versatile || c->versatile) && !c->isfixed) 166 && (lt->arrange == versatile || c->isversatile) && !c->isfixed)
167 { 167 {
168 restack(); 168 restack();
169 resizemouse(c); 169 resizemouse(c);
@@ -181,7 +181,7 @@ configurerequest(XEvent *e) {
181 c->ismax = False; 181 c->ismax = False;
182 if(ev->value_mask & CWBorderWidth) 182 if(ev->value_mask & CWBorderWidth)
183 c->border = ev->border_width; 183 c->border = ev->border_width;
184 if(c->isfixed || c->versatile || (lt->arrange == versatile)) { 184 if(c->isfixed || c->isversatile || (lt->arrange == versatile)) {
185 if(ev->value_mask & CWX) 185 if(ev->value_mask & CWX)
186 c->x = ev->x; 186 c->x = ev->x;
187 if(ev->value_mask & CWY) 187 if(ev->value_mask & CWY)
@@ -309,7 +309,7 @@ propertynotify(XEvent *e) {
309 default: break; 309 default: break;
310 case XA_WM_TRANSIENT_FOR: 310 case XA_WM_TRANSIENT_FOR:
311 XGetTransientForHint(dpy, c->win, &trans); 311 XGetTransientForHint(dpy, c->win, &trans);
312 if(!c->versatile && (c->versatile = (getclient(trans) != NULL))) 312 if(!c->isversatile && (c->isversatile = (getclient(trans) != NULL)))
313 lt->arrange(); 313 lt->arrange();
314 break; 314 break;
315 case XA_WM_NORMAL_HINTS: 315 case XA_WM_NORMAL_HINTS:
diff --git a/screen.c b/screen.c
index e0da2cf..5907ba7 100644
--- a/screen.c
+++ b/screen.c
@@ -19,7 +19,7 @@ Layout *lt = NULL;
19typedef struct { 19typedef struct {
20 const char *prop; 20 const char *prop;
21 const char *tags; 21 const char *tags;
22 Bool versatile; 22 Bool isversatile;
23} Rule; 23} Rule;
24 24
25typedef struct { 25typedef struct {
@@ -52,7 +52,7 @@ tile(void) {
52 if(c->isbanned) 52 if(c->isbanned)
53 XMoveWindow(dpy, c->win, c->x, c->y); 53 XMoveWindow(dpy, c->win, c->x, c->y);
54 c->isbanned = False; 54 c->isbanned = False;
55 if(c->versatile) 55 if(c->isversatile)
56 continue; 56 continue;
57 c->ismax = False; 57 c->ismax = False;
58 nx = wax; 58 nx = wax;
@@ -175,10 +175,10 @@ restack(void) {
175 drawstatus(); 175 drawstatus();
176 if(!sel) 176 if(!sel)
177 return; 177 return;
178 if(sel->versatile || lt->arrange == versatile) 178 if(sel->isversatile || lt->arrange == versatile)
179 XRaiseWindow(dpy, sel->win); 179 XRaiseWindow(dpy, sel->win);
180 if(lt->arrange != versatile) { 180 if(lt->arrange != versatile) {
181 if(!sel->versatile) 181 if(!sel->isversatile)
182 XLowerWindow(dpy, sel->win); 182 XLowerWindow(dpy, sel->win);
183 for(c = nexttiled(clients); c; c = nexttiled(c->next)) { 183 for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
184 if(c == sel) 184 if(c == sel)
@@ -208,7 +208,7 @@ settags(Client *c, Client *trans) {
208 ch.res_name ? ch.res_name : "", c->name); 208 ch.res_name ? ch.res_name : "", c->name);
209 for(i = 0; i < nrules; i++) 209 for(i = 0; i < nrules; i++)
210 if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0)) { 210 if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0)) {
211 c->versatile = rule[i].versatile; 211 c->isversatile = rule[i].isversatile;
212 for(j = 0; regs[i].tagregex && j < ntags; j++) { 212 for(j = 0; regs[i].tagregex && j < ntags; j++) {
213 if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) { 213 if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) {
214 matched = True; 214 matched = True;
@@ -271,7 +271,7 @@ void
271toggleversatile(Arg *arg) { 271toggleversatile(Arg *arg) {
272 if(!sel || lt->arrange == versatile) 272 if(!sel || lt->arrange == versatile)
273 return; 273 return;
274 sel->versatile = !sel->versatile; 274 sel->isversatile = !sel->isversatile;
275 lt->arrange(); 275 lt->arrange();
276} 276}
277 277