summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-05-22 21:33:44 +0000
committerDana Jansens <danakj@orodu.net>2003-05-22 21:33:44 +0000
commitd3980aa459d725f13a7087e66b89c9242acf2def (patch)
treef9069129e04b38cddf8ef8267ba80b586d2c6593 /openbox
parentf249e01616f6b18dc56a4367ecdf22698476bfbf (diff)
only button 1 can use menu items
Diffstat (limited to 'openbox')
-rw-r--r--openbox/event.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/openbox/event.c b/openbox/event.c
index a4e51280..366e5eb7 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -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);
+ }
}
}