X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=650967ea335817a13bc09279236e398504315f98;hb=d3969634ac3b2e145402295e9833ce149f87fe45;hp=36d873f983907a3d7b28590ca889d09acd5bbea3;hpb=4bd0d33f57c6fb764ef546a9b0ebfcd20ff1df70;p=dwm.git diff --git a/event.c b/event.c index 36d873f..650967e 100644 --- a/event.c +++ b/event.c @@ -114,10 +114,10 @@ buttonpress(XEvent *e) } break; case Button4: - viewnext(&a); + viewprev(&a); break; case Button5: - viewprev(&a); + viewnext(&a); break; } } @@ -132,8 +132,7 @@ buttonpress(XEvent *e) movemouse(c); break; case Button2: - if(!c->ismax && arrange != dofloat && !c->isfloat) - zoom(NULL); + zoom(NULL); break; case Button3: if(!c->ismax && (arrange == dofloat || c->isfloat)) @@ -226,8 +225,11 @@ enternotify(XEvent *e) if((c = getclient(ev->window)) || (c = getctitle(ev->window))) focus(c); - else if(ev->window == root) + else if(ev->window == root) { issel = True; + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + drawall(); + } } static void @@ -267,8 +269,10 @@ leavenotify(XEvent *e) { XCrossingEvent *ev = &e->xcrossing; - if((ev->window == root) && !ev->same_screen) - issel = True; + if((ev->window == root) && !ev->same_screen) { + issel = False; + drawall(); + } } static void