JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
applied sanders man page patch, removed button2 from bar click
[dwm.git] / event.c
diff --git a/event.c b/event.c
index 85205d9..187c65e 100644 (file)
--- a/event.c
+++ b/event.c
@@ -109,10 +109,10 @@ buttonpress(XEvent *e)
                for(a.i = 0; a.i < ntags; a.i++) {
                        x += textw(tags[a.i]);
                        if(ev->x < x) {
-                               if(ev->button == Button3)
-                                       toggleview(&a);
-                               else
+                               if(ev->button == Button1)
                                        view(&a);
+                               else if(ev->button == Button3)
+                                       toggleview(&a);
                                return;
                        }
                }
@@ -144,11 +144,11 @@ buttonpress(XEvent *e)
 static void
 configurerequest(XEvent *e)
 {
+       unsigned long newmask;
        Client *c;
        XConfigureRequestEvent *ev = &e->xconfigurerequest;
        XEvent synev;
        XWindowChanges wc;
-       unsigned long newmask;
 
        if((c = getclient(ev->window))) {
                gravitate(c, True);
@@ -382,6 +382,5 @@ grabkeys()
                                GrabModeAsync, GrabModeAsync);
                XGrabKey(dpy, code, key[i].mod | NUMLOCKMASK | LockMask, root, True,
                                GrabModeAsync, GrabModeAsync);
-               XSync(dpy, False);
        }
 }