dwm-meillo
changeset 714:7034ee0f48d6
small changes
author | Anselm R. Garbe <arg@suckless.org> |
---|---|
date | Tue, 23 Jan 2007 12:29:17 +0100 |
parents | ef2c267884f3 |
children | 5b3e4cdb6674 |
files | client.c dwm.h event.c main.c |
diffstat | 4 files changed, 11 insertions(+), 9 deletions(-) [+] |
line diff
1.1 --- a/client.c Tue Jan 23 12:04:22 2007 +0100 1.2 +++ b/client.c Tue Jan 23 12:29:17 2007 +0100 1.3 @@ -85,20 +85,22 @@ 1.4 grabbuttons(sel, False); 1.5 XSetWindowBorder(dpy, sel->win, dc.norm[ColBorder]); 1.6 } 1.7 - sel = c; 1.8 - if(!issel) 1.9 - return; 1.10 if(c) { 1.11 detachstack(c); 1.12 c->snext = stack; 1.13 stack = c; 1.14 grabbuttons(c, True); 1.15 + } 1.16 + sel = c; 1.17 + drawstatus(); 1.18 + if(!activescreen) 1.19 + return; 1.20 + if(sel) { 1.21 XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); 1.22 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); 1.23 } 1.24 else 1.25 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); 1.26 - drawstatus(); 1.27 } 1.28 1.29 Client *
2.1 --- a/dwm.h Tue Jan 23 12:04:22 2007 +0100 2.2 +++ b/dwm.h Tue Jan 23 12:29:17 2007 +0100 2.3 @@ -93,7 +93,7 @@ 2.4 extern void (*handler[LASTEvent])(XEvent *); /* event handler */ 2.5 extern void (*arrange)(void); /* arrange function, indicates mode */ 2.6 extern Atom wmatom[WMLast], netatom[NetLast]; 2.7 -extern Bool running, issel, *seltag; /* seltag is array of Bool */ 2.8 +extern Bool activescreen, running, *seltag; /* seltag is array of Bool */ 2.9 extern Client *clients, *sel, *stack; /* global client list and stack */ 2.10 extern Cursor cursor[CurLast]; 2.11 extern DC dc; /* global draw context */
3.1 --- a/event.c Tue Jan 23 12:04:22 2007 +0100 3.2 +++ b/event.c Tue Jan 23 12:29:17 2007 +0100 3.3 @@ -230,7 +230,7 @@ 3.4 if((c = getclient(ev->window)) && isvisible(c)) 3.5 focus(c); 3.6 else if(ev->window == root) { 3.7 - issel = True; 3.8 + activescreen = True; 3.9 for(c = stack; c && !isvisible(c); c = c->snext); 3.10 focus(c); 3.11 } 3.12 @@ -269,7 +269,7 @@ 3.13 XCrossingEvent *ev = &e->xcrossing; 3.14 3.15 if((ev->window == root) && !ev->same_screen) { 3.16 - issel = False; 3.17 + activescreen = False; 3.18 focus(NULL); 3.19 } 3.20 }
4.1 --- a/main.c Tue Jan 23 12:04:22 2007 +0100 4.2 +++ b/main.c Tue Jan 23 12:29:17 2007 +0100 4.3 @@ -23,7 +23,7 @@ 4.4 unsigned int master, nmaster, ntags, numlockmask; 4.5 Atom wmatom[WMLast], netatom[NetLast]; 4.6 Bool running = True; 4.7 -Bool issel = True; 4.8 +Bool activescreen = True; 4.9 Client *clients = NULL; 4.10 Client *sel = NULL; 4.11 Client *stack = NULL; 4.12 @@ -156,7 +156,7 @@ 4.13 dc.gc = XCreateGC(dpy, root, 0, 0); 4.14 XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); 4.15 /* multihead support */ 4.16 - issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); 4.17 + activescreen = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); 4.18 } 4.19 4.20 /*