grabbuttons(sel, False);
XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]);
}
- sel = c;
- if(!issel)
- return;
if(c) {
detachstack(c);
c->snext = stack;
stack = c;
grabbuttons(c, True);
+ }
+ sel = c;
+ drawstatus();
+ if(!activescreen)
+ return;
+ if(sel) {
XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
}
else
XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
- drawstatus();
}
Client *
extern void (*handler[LASTEvent])(XEvent *); /* event handler */
extern void (*arrange)(void); /* arrange function, indicates mode */
extern Atom wmatom[WMLast], netatom[NetLast];
-extern Bool running, issel, *seltag; /* seltag is array of Bool */
+extern Bool activescreen, running, *seltag; /* seltag is array of Bool */
extern Client *clients, *sel, *stack; /* global client list and stack */
extern Cursor cursor[CurLast];
extern DC dc; /* global draw context */
if((c = getclient(ev->window)) && isvisible(c))
focus(c);
else if(ev->window == root) {
- issel = True;
+ activescreen = True;
for(c = stack; c && !isvisible(c); c = c->snext);
focus(c);
}
XCrossingEvent *ev = &e->xcrossing;
if((ev->window == root) && !ev->same_screen) {
- issel = False;
+ activescreen = False;
focus(NULL);
}
}
unsigned int master, nmaster, ntags, numlockmask;
Atom wmatom[WMLast], netatom[NetLast];
Bool running = True;
-Bool issel = True;
+Bool activescreen = True;
Client *clients = NULL;
Client *sel = NULL;
Client *stack = NULL;
dc.gc = XCreateGC(dpy, root, 0, 0);
XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
/* multihead support */
- issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);
+ activescreen = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);
}
/*