From d3980aa459d725f13a7087e66b89c9242acf2def Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 22 May 2003 21:33:44 +0000 Subject: [PATCH] only button 1 can use menu items --- openbox/event.c | 26 ++++++++++++++------------ 1 file 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); + } } } -- 2.45.2