dwm-meillo

diff event.c @ 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 1227c21588e2
line diff
     1.1 --- a/event.c	Thu Aug 10 11:19:25 2006 +0200
     1.2 +++ b/event.c	Thu Aug 10 11:26:32 2006 +0200
     1.3 @@ -114,10 +114,10 @@
     1.4  			}
     1.5  			break;
     1.6  		case Button4:
     1.7 -			viewnext(&a);
     1.8 +			viewprev(&a);
     1.9  			break;
    1.10  		case Button5:
    1.11 -			viewprev(&a);
    1.12 +			viewnext(&a);
    1.13  			break;
    1.14  		}
    1.15  	}
    1.16 @@ -226,8 +226,11 @@
    1.17  
    1.18  	if((c = getclient(ev->window)) || (c = getctitle(ev->window)))
    1.19  		focus(c);
    1.20 -	else if(ev->window == root)
    1.21 +	else if(ev->window == root) {
    1.22  		issel = True;
    1.23 +		XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
    1.24 +		drawall();
    1.25 +	}
    1.26  }
    1.27  
    1.28  static void
    1.29 @@ -267,8 +270,10 @@
    1.30  {
    1.31  	XCrossingEvent *ev = &e->xcrossing;
    1.32  
    1.33 -	if((ev->window == root) && !ev->same_screen)
    1.34 -		issel = True;
    1.35 +	if((ev->window == root) && !ev->same_screen) {
    1.36 +		issel = False;
    1.37 +		drawall();
    1.38 +	}
    1.39  }
    1.40  
    1.41  static void