# HG changeset patch # User Richard M. Stallman # Date 811985586 0 # Node ID 2e514396cbc8d7b1f3641a2200be7064f82fc033 # Parent c668502d5a932da4c4e4a20136ef97978216d32e (popup_get_selection): Pop menu down if button is pressed outside the menu. (xmenu_show): Ignore `quote' when looking up the result. diff -r c668502d5a93 -r 2e514396cbc8 src/xmenu.c --- a/src/xmenu.c Sun Sep 24 23:28:18 1995 +0000 +++ b/src/xmenu.c Sun Sep 24 23:33:06 1995 +0000 @@ -1095,6 +1095,14 @@ popup_activated_flag = 0; break; } + /* Button presses outside the menu also pop it down. */ + else if (event.type == ButtonPress + && event.xany.display == dpyinfo->display + && x_any_window_to_frame (dpyinfo, event.xany.window)) + { + popup_activated_flag = 0; + break; + } /* Queue all events not for this popup, except for Expose, which we've already handled. @@ -2089,6 +2097,10 @@ = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX]; i += MENU_ITEMS_PANE_LENGTH; } + /* Ignore a nil in the item list. + It's meaningful only for dialog boxes. */ + else if (EQ (XVECTOR (menu_items)->contents[i], Qquote)) + i += 1; else { entry