From: Dana Jansens Date: Thu, 22 May 2003 21:33:44 +0000 (+0000) Subject: only button 1 can use menu items X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=d3980aa459d725f13a7087e66b89c9242acf2def;p=chaz%2Fopenbox only button 1 can use menu items --- 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); + } } }