dwm-meillo

changeset 239:e5390f8e06b9

applied sumik's multihead patch
author Anselm R.Garbe <arg@10ksloc.org>
date Thu, 10 Aug 2006 11:26:32 +0200
parents 969fb6be25e1
children 87c5d5176e17
files client.c draw.c event.c
diffstat 3 files changed, 13 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/client.c	Thu Aug 10 11:19:25 2006 +0200
     1.2 +++ b/client.c	Thu Aug 10 11:26:32 2006 +0200
     1.3 @@ -49,6 +49,8 @@
     1.4  void
     1.5  focus(Client *c)
     1.6  {
     1.7 +	if (!issel)
     1.8 +		return;
     1.9  	Client *old = sel;
    1.10  	XEvent ev;
    1.11  
     2.1 --- a/draw.c	Thu Aug 10 11:19:25 2006 +0200
     2.2 +++ b/draw.c	Thu Aug 10 11:26:32 2006 +0200
     2.3 @@ -138,7 +138,7 @@
     2.4  	int i;
     2.5  	Bool istile = arrange == dotile;
     2.6  
     2.7 -	if(c == sel) {
     2.8 +	if(c == sel && issel) {
     2.9  		drawstatus();
    2.10  		XUnmapWindow(dpy, c->title);
    2.11  		XSetWindowBorder(dpy, c->win, dc.fg);
     3.1 --- a/event.c	Thu Aug 10 11:19:25 2006 +0200
     3.2 +++ b/event.c	Thu Aug 10 11:26:32 2006 +0200
     3.3 @@ -114,10 +114,10 @@
     3.4  			}
     3.5  			break;
     3.6  		case Button4:
     3.7 -			viewnext(&a);
     3.8 +			viewprev(&a);
     3.9  			break;
    3.10  		case Button5:
    3.11 -			viewprev(&a);
    3.12 +			viewnext(&a);
    3.13  			break;
    3.14  		}
    3.15  	}
    3.16 @@ -226,8 +226,11 @@
    3.17  
    3.18  	if((c = getclient(ev->window)) || (c = getctitle(ev->window)))
    3.19  		focus(c);
    3.20 -	else if(ev->window == root)
    3.21 +	else if(ev->window == root) {
    3.22  		issel = True;
    3.23 +		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
    3.24 +		drawall();
    3.25 +	}
    3.26  }
    3.27  
    3.28  static void
    3.29 @@ -267,8 +270,10 @@
    3.30  {
    3.31  	XCrossingEvent *ev = &e->xcrossing;
    3.32  
    3.33 -	if((ev->window == root) && !ev->same_screen)
    3.34 -		issel = True;
    3.35 +	if((ev->window == root) && !ev->same_screen) {
    3.36 +		issel = False;
    3.37 +		drawall();
    3.38 +	}
    3.39  }
    3.40  
    3.41  static void