summaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'event.c')
-rw-r--r--event.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/event.c b/event.c
index 36d873f..25ed6fa 100644
--- a/event.c
+++ b/event.c
@@ -114,10 +114,10 @@ buttonpress(XEvent *e)
114 } 114 }
115 break; 115 break;
116 case Button4: 116 case Button4:
117 viewnext(&a); 117 viewprev(&a);
118 break; 118 break;
119 case Button5: 119 case Button5:
120 viewprev(&a); 120 viewnext(&a);
121 break; 121 break;
122 } 122 }
123 } 123 }
@@ -226,8 +226,11 @@ enternotify(XEvent *e)
226 226
227 if((c = getclient(ev->window)) || (c = getctitle(ev->window))) 227 if((c = getclient(ev->window)) || (c = getctitle(ev->window)))
228 focus(c); 228 focus(c);
229 else if(ev->window == root) 229 else if(ev->window == root) {
230 issel = True; 230 issel = True;
231 XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
232 drawall();
233 }
231} 234}
232 235
233static void 236static void
@@ -267,8 +270,10 @@ leavenotify(XEvent *e)
267{ 270{
268 XCrossingEvent *ev = &e->xcrossing; 271 XCrossingEvent *ev = &e->xcrossing;
269 272
270 if((ev->window == root) && !ev->same_screen) 273 if((ev->window == root) && !ev->same_screen) {
271 issel = True; 274 issel = False;
275 drawall();
276 }
272} 277}
273 278
274static void 279static void