Browse Source

renamed Client->versatile and Rule->versatile into Client->isversatile resp. Rule->isversatile

config
Anselm R. Garbe 17 years ago
parent
commit
5a03daf47f
5 changed files with 16 additions and 16 deletions
  1. +4
    -4
      client.c
  2. +1
    -1
      config.arg.h
  3. +1
    -1
      dwm.h
  4. +4
    -4
      event.c
  5. +6
    -6
      screen.c

+ 4
- 4
client.c View File

@ -253,8 +253,8 @@ manage(Window w, XWindowAttributes *wa) {
updatetitle(c); updatetitle(c);
for(t = clients; t && t->win != trans; t = t->next); for(t = clients; t && t->win != trans; t = t->next);
settags(c, t); settags(c, t);
if(!c->versatile)
c->versatile = (t != NULL) || c->isfixed;
if(!c->isversatile)
c->isversatile = (t != NULL) || c->isfixed;
attach(c); attach(c);
attachstack(c); attachstack(c);
c->isbanned = True; c->isbanned = True;
@ -268,7 +268,7 @@ manage(Window w, XWindowAttributes *wa) {
Client * Client *
nexttiled(Client *c) { nexttiled(Client *c) {
for(; c && (c->versatile || !isvisible(c)); c = c->next);
for(; c && (c->isversatile || !isvisible(c)); c = c->next);
return c; return c;
} }
@ -440,7 +440,7 @@ zoom(Arg *arg) {
if(!sel) if(!sel)
return; return;
if(sel->versatile || (lt->arrange == versatile)) {
if(sel->isversatile || (lt->arrange == versatile)) {
togglemax(sel); togglemax(sel);
return; return;
} }


+ 1
- 1
config.arg.h View File

@ -89,7 +89,7 @@ static Key key[] = { \
#define RULES \ #define RULES \
static Rule rule[] = { \ static Rule rule[] = { \
/* class:instance:title regex tags regex versatile */ \
/* class:instance:title regex tags regex isversatile */ \
{ "Firefox", "3", False }, \ { "Firefox", "3", False }, \
{ "Gimp", NULL, True }, \ { "Gimp", NULL, True }, \
{ "MPlayer", NULL, True }, \ { "MPlayer", NULL, True }, \


+ 1
- 1
dwm.h View File

@ -72,7 +72,7 @@ struct Client {
int minax, minay, maxax, maxay; int minax, minay, maxax, maxay;
long flags; long flags;
unsigned int border; unsigned int border;
Bool isbanned, isfixed, ismax, versatile;
Bool isbanned, isfixed, ismax, isversatile;
Bool *tags; Bool *tags;
Client *next; Client *next;
Client *prev; Client *prev;


+ 4
- 4
event.c View File

@ -156,14 +156,14 @@ buttonpress(XEvent *e) {
focus(c); focus(c);
if(CLEANMASK(ev->state) != MODKEY) if(CLEANMASK(ev->state) != MODKEY)
return; return;
if(ev->button == Button1 && (lt->arrange == versatile || c->versatile)) {
if(ev->button == Button1 && (lt->arrange == versatile || c->isversatile)) {
restack(); restack();
movemouse(c); movemouse(c);
} }
else if(ev->button == Button2) else if(ev->button == Button2)
zoom(NULL); zoom(NULL);
else if(ev->button == Button3 else if(ev->button == Button3
&& (lt->arrange == versatile || c->versatile) && !c->isfixed)
&& (lt->arrange == versatile || c->isversatile) && !c->isfixed)
{ {
restack(); restack();
resizemouse(c); resizemouse(c);
@ -181,7 +181,7 @@ configurerequest(XEvent *e) {
c->ismax = False; c->ismax = False;
if(ev->value_mask & CWBorderWidth) if(ev->value_mask & CWBorderWidth)
c->border = ev->border_width; c->border = ev->border_width;
if(c->isfixed || c->versatile || (lt->arrange == versatile)) {
if(c->isfixed || c->isversatile || (lt->arrange == versatile)) {
if(ev->value_mask & CWX) if(ev->value_mask & CWX)
c->x = ev->x; c->x = ev->x;
if(ev->value_mask & CWY) if(ev->value_mask & CWY)
@ -309,7 +309,7 @@ propertynotify(XEvent *e) {
default: break; default: break;
case XA_WM_TRANSIENT_FOR: case XA_WM_TRANSIENT_FOR:
XGetTransientForHint(dpy, c->win, &trans); XGetTransientForHint(dpy, c->win, &trans);
if(!c->versatile && (c->versatile = (getclient(trans) != NULL)))
if(!c->isversatile && (c->isversatile = (getclient(trans) != NULL)))
lt->arrange(); lt->arrange();
break; break;
case XA_WM_NORMAL_HINTS: case XA_WM_NORMAL_HINTS:


+ 6
- 6
screen.c View File

@ -19,7 +19,7 @@ Layout *lt = NULL;
typedef struct { typedef struct {
const char *prop; const char *prop;
const char *tags; const char *tags;
Bool versatile;
Bool isversatile;
} Rule; } Rule;
typedef struct { typedef struct {
@ -52,7 +52,7 @@ tile(void) {
if(c->isbanned) if(c->isbanned)
XMoveWindow(dpy, c->win, c->x, c->y); XMoveWindow(dpy, c->win, c->x, c->y);
c->isbanned = False; c->isbanned = False;
if(c->versatile)
if(c->isversatile)
continue; continue;
c->ismax = False; c->ismax = False;
nx = wax; nx = wax;
@ -175,10 +175,10 @@ restack(void) {
drawstatus(); drawstatus();
if(!sel) if(!sel)
return; return;
if(sel->versatile || lt->arrange == versatile)
if(sel->isversatile || lt->arrange == versatile)
XRaiseWindow(dpy, sel->win); XRaiseWindow(dpy, sel->win);
if(lt->arrange != versatile) { if(lt->arrange != versatile) {
if(!sel->versatile)
if(!sel->isversatile)
XLowerWindow(dpy, sel->win); XLowerWindow(dpy, sel->win);
for(c = nexttiled(clients); c; c = nexttiled(c->next)) { for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
if(c == sel) if(c == sel)
@ -208,7 +208,7 @@ settags(Client *c, Client *trans) {
ch.res_name ? ch.res_name : "", c->name); ch.res_name ? ch.res_name : "", c->name);
for(i = 0; i < nrules; i++) for(i = 0; i < nrules; i++)
if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0)) { if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0)) {
c->versatile = rule[i].versatile;
c->isversatile = rule[i].isversatile;
for(j = 0; regs[i].tagregex && j < ntags; j++) { for(j = 0; regs[i].tagregex && j < ntags; j++) {
if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) { if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) {
matched = True; matched = True;
@ -271,7 +271,7 @@ void
toggleversatile(Arg *arg) { toggleversatile(Arg *arg) {
if(!sel || lt->arrange == versatile) if(!sel || lt->arrange == versatile)
return; return;
sel->versatile = !sel->versatile;
sel->isversatile = !sel->isversatile;
lt->arrange(); lt->arrange();
} }


Loading…
Cancel
Save