dwm-meillo

changeset 711:b40134b93de3

I think this is the best solution of multihead support
author Anselm R. Garbe <arg@suckless.org>
date Tue, 23 Jan 2007 11:49:16 +0100
parents a25294eac73a
children b288b57d81f8
files client.c event.c
diffstat 2 files changed, 7 insertions(+), 11 deletions(-) [+]
line diff
     1.1 --- a/client.c	Mon Jan 22 16:02:37 2007 +0100
     1.2 +++ b/client.c	Tue Jan 23 11:49:16 2007 +0100
     1.3 @@ -89,16 +89,12 @@
     1.4  		XSetWindowBorder(dpy, old->win, dc.norm[ColBorder]);
     1.5  	}
     1.6  	if(c) {
     1.7 -		if(issel) {
     1.8 -			detachstack(c);
     1.9 -			c->snext = stack;
    1.10 -			stack = c;
    1.11 -			grabbuttons(c, True);
    1.12 -			XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
    1.13 -			XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
    1.14 -		}
    1.15 -		else
    1.16 -			XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]);
    1.17 +		detachstack(c);
    1.18 +		c->snext = stack;
    1.19 +		stack = c;
    1.20 +		grabbuttons(c, True);
    1.21 +		XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]);
    1.22 +		XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
    1.23  	}
    1.24  	else if(issel)
    1.25  		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
     2.1 --- a/event.c	Mon Jan 22 16:02:37 2007 +0100
     2.2 +++ b/event.c	Tue Jan 23 11:49:16 2007 +0100
     2.3 @@ -270,7 +270,7 @@
     2.4  
     2.5  	if((ev->window == root) && !ev->same_screen) {
     2.6  		issel = False;
     2.7 -		focus(sel);
     2.8 +		focus(NULL);
     2.9  	}
    2.10  }
    2.11