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

This commit is contained in:
Anselm R. Garbe 2007-02-19 17:18:24 +01:00
parent 6d5f67a092
commit 5a03daf47f
5 changed files with 16 additions and 16 deletions

View File

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

View File

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

2
dwm.h
View File

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

View File

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

View File

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