renamed Client->versatile and Rule->versatile into Client->isversatile resp. Rule->isversatile
5a03daf4
5 file(s) · +16 −16
| 253 | 253 | updatetitle(c); |
|
| 254 | 254 | for(t = clients; t && t->win != trans; t = t->next); |
|
| 255 | 255 | settags(c, t); |
|
| 256 | - | if(!c->versatile) |
|
| 257 | - | c->versatile = (t != NULL) || c->isfixed; |
|
| 256 | + | if(!c->isversatile) |
|
| 257 | + | c->isversatile = (t != NULL) || c->isfixed; |
|
| 258 | 258 | attach(c); |
|
| 259 | 259 | attachstack(c); |
|
| 260 | 260 | c->isbanned = True; |
|
| 268 | 268 | ||
| 269 | 269 | Client * |
|
| 270 | 270 | nexttiled(Client *c) { |
|
| 271 | - | for(; c && (c->versatile || !isvisible(c)); c = c->next); |
|
| 271 | + | for(; c && (c->isversatile || !isvisible(c)); c = c->next); |
|
| 272 | 272 | return c; |
|
| 273 | 273 | } |
|
| 274 | 274 | ||
| 440 | 440 | ||
| 441 | 441 | if(!sel) |
|
| 442 | 442 | return; |
|
| 443 | - | if(sel->versatile || (lt->arrange == versatile)) { |
|
| 443 | + | if(sel->isversatile || (lt->arrange == versatile)) { |
|
| 444 | 444 | togglemax(sel); |
|
| 445 | 445 | return; |
|
| 446 | 446 | } |
|
| 89 | 89 | ||
| 90 | 90 | #define RULES \ |
|
| 91 | 91 | static Rule rule[] = { \ |
|
| 92 | - | /* class:instance:title regex tags regex versatile */ \ |
|
| 92 | + | /* class:instance:title regex tags regex isversatile */ \ |
|
| 93 | 93 | { "Firefox", "3", False }, \ |
|
| 94 | 94 | { "Gimp", NULL, True }, \ |
|
| 95 | 95 | { "MPlayer", NULL, True }, \ |
| 72 | 72 | int minax, minay, maxax, maxay; |
|
| 73 | 73 | long flags; |
|
| 74 | 74 | unsigned int border; |
|
| 75 | - | Bool isbanned, isfixed, ismax, versatile; |
|
| 75 | + | Bool isbanned, isfixed, ismax, isversatile; |
|
| 76 | 76 | Bool *tags; |
|
| 77 | 77 | Client *next; |
|
| 78 | 78 | Client *prev; |
| 156 | 156 | focus(c); |
|
| 157 | 157 | if(CLEANMASK(ev->state) != MODKEY) |
|
| 158 | 158 | return; |
|
| 159 | - | if(ev->button == Button1 && (lt->arrange == versatile || c->versatile)) { |
|
| 159 | + | if(ev->button == Button1 && (lt->arrange == versatile || c->isversatile)) { |
|
| 160 | 160 | restack(); |
|
| 161 | 161 | movemouse(c); |
|
| 162 | 162 | } |
|
| 163 | 163 | else if(ev->button == Button2) |
|
| 164 | 164 | zoom(NULL); |
|
| 165 | 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 | 168 | restack(); |
|
| 169 | 169 | resizemouse(c); |
|
| 181 | 181 | c->ismax = False; |
|
| 182 | 182 | if(ev->value_mask & CWBorderWidth) |
|
| 183 | 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 | 185 | if(ev->value_mask & CWX) |
|
| 186 | 186 | c->x = ev->x; |
|
| 187 | 187 | if(ev->value_mask & CWY) |
|
| 309 | 309 | default: break; |
|
| 310 | 310 | case XA_WM_TRANSIENT_FOR: |
|
| 311 | 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 | 313 | lt->arrange(); |
|
| 314 | 314 | break; |
|
| 315 | 315 | case XA_WM_NORMAL_HINTS: |
|
| 19 | 19 | typedef struct { |
|
| 20 | 20 | const char *prop; |
|
| 21 | 21 | const char *tags; |
|
| 22 | - | Bool versatile; |
|
| 22 | + | Bool isversatile; |
|
| 23 | 23 | } Rule; |
|
| 24 | 24 | ||
| 25 | 25 | typedef struct { |
|
| 52 | 52 | if(c->isbanned) |
|
| 53 | 53 | XMoveWindow(dpy, c->win, c->x, c->y); |
|
| 54 | 54 | c->isbanned = False; |
|
| 55 | - | if(c->versatile) |
|
| 55 | + | if(c->isversatile) |
|
| 56 | 56 | continue; |
|
| 57 | 57 | c->ismax = False; |
|
| 58 | 58 | nx = wax; |
|
| 175 | 175 | drawstatus(); |
|
| 176 | 176 | if(!sel) |
|
| 177 | 177 | return; |
|
| 178 | - | if(sel->versatile || lt->arrange == versatile) |
|
| 178 | + | if(sel->isversatile || lt->arrange == versatile) |
|
| 179 | 179 | XRaiseWindow(dpy, sel->win); |
|
| 180 | 180 | if(lt->arrange != versatile) { |
|
| 181 | - | if(!sel->versatile) |
|
| 181 | + | if(!sel->isversatile) |
|
| 182 | 182 | XLowerWindow(dpy, sel->win); |
|
| 183 | 183 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { |
|
| 184 | 184 | if(c == sel) |
|
| 208 | 208 | ch.res_name ? ch.res_name : "", c->name); |
|
| 209 | 209 | for(i = 0; i < nrules; i++) |
|
| 210 | 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 | 212 | for(j = 0; regs[i].tagregex && j < ntags; j++) { |
|
| 213 | 213 | if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) { |
|
| 214 | 214 | matched = True; |
|
| 271 | 271 | toggleversatile(Arg *arg) { |
|
| 272 | 272 | if(!sel || lt->arrange == versatile) |
|
| 273 | 273 | return; |
|
| 274 | - | sel->versatile = !sel->versatile; |
|
| 274 | + | sel->isversatile = !sel->isversatile; |
|
| 275 | 275 | lt->arrange(); |
|
| 276 | 276 | } |
|
| 277 | 277 | ||