X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=ac96df1c190ad464d4ac2c5e67490189170811a0;hb=e0cfe076485e7df266b53eaffaa093d9c94a61a7;hp=6b1595089a1dcbdd37b2303ff3d49d979d0bea4c;hpb=9fdd2cd1a9dbe9b533fab9a8a98b9849dc4c7b59;p=dwm.git diff --git a/event.c b/event.c index 6b15950..ac96df1 100644 --- a/event.c +++ b/event.c @@ -1,8 +1,4 @@ -/* © 2006-2007 Anselm R. Garbe - * © 2006-2007 Sander van Dijk - * © 2007 Premysl Hruby - * © 2007 Szabolcs Nagy - * See LICENSE file for license details. */ +/* See LICENSE file for copyright and license details. */ #include "dwm.h" #include #include @@ -139,6 +135,10 @@ buttonpress(XEvent *e) { else toggleview(buf); } + else if(ev->button == Button4) + shiftview("-1"); + else if(ev->button == Button5) + shiftview("1"); return; } } @@ -148,6 +148,10 @@ buttonpress(XEvent *e) { setlayout(NULL); break; } + else if(ev->button == Button4) + focusclient("-1"); + else if(ev->button == Button5) + focusclient("1"); } else if((c = getclient(ev->window))) { focus(c); @@ -244,7 +248,7 @@ enternotify(XEvent *e) { if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) return; - if(c = getclient(ev->window)) + if((c = getclient(ev->window))) focus(c); else if(ev->window == root) { selscreen = True;