X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=event.c;h=a34bdc8492f3d68ed32a07149b2d4b8cc8e1e298;hb=d9a6a3b5d2e0152d5746723fcd482994602f292e;hp=99216b3cb54a64c07c389c288b14f7256642d01c;hpb=77f8c075c48e510e064b8f0b7b823a7e1f9f44b7;p=dwm.git diff --git a/event.c b/event.c index 99216b3..a34bdc8 100644 --- a/event.c +++ b/event.c @@ -116,12 +116,10 @@ buttonpress(XEvent *e) } break; case Button4: - a.i = (tsel + 1 < TLast) ? tsel + 1 : 0; - view(&a); + viewnext(&a); break; case Button5: - a.i = (tsel - 1 >= 0) ? tsel - 1 : TLast - 1; - view(&a); + viewprev(&a); break; } }