]> Dogcows Code - chaz/openbox/commitdiff
only button 1 can use menu items
authorDana Jansens <danakj@orodu.net>
Thu, 22 May 2003 21:33:44 +0000 (21:33 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 22 May 2003 21:33:44 +0000 (21:33 +0000)
openbox/event.c

index a4e512808145ed0fac675537ae2c40ecb31c0db8..366e5eb7d343c1626a6463e303bbce1c74a9ba0b 100644 (file)
@@ -931,18 +931,20 @@ static void event_handle_menu(Menu *menu, Client *client, XEvent *e)
 
 /*        grab_pointer_window(FALSE, None, menu->frame);*/
 
-        entry = menu_find_entry(menu, e->xbutton.window);
-        if (entry) {
-            int junk;
-            Window wjunk;
-            guint ujunk, b, w, h;
-            XGetGeometry(ob_display, e->xbutton.window,
-                         &wjunk, &junk, &junk, &w, &h, &b, &ujunk);
-            if (e->xbutton.x >= (signed)-b &&
-                e->xbutton.y >= (signed)-b &&
-                e->xbutton.x < (signed)(w+b) &&
-                e->xbutton.y < (signed)(h+b)) {
-                menu_entry_fire(entry);
+        if (e->xbutton.button == 1) {
+            entry = menu_find_entry(menu, e->xbutton.window);
+            if (entry) {
+                int junk;
+                Window wjunk;
+                guint ujunk, b, w, h;
+                XGetGeometry(ob_display, e->xbutton.window,
+                             &wjunk, &junk, &junk, &w, &h, &b, &ujunk);
+                if (e->xbutton.x >= (signed)-b &&
+                    e->xbutton.y >= (signed)-b &&
+                    e->xbutton.x < (signed)(w+b) &&
+                    e->xbutton.y < (signed)(h+b)) {
+                    menu_entry_fire(entry);
+                }
             }
         }
        
This page took 0.029076 seconds and 4 git commands to generate.