# HG changeset patch # User Richard M. Stallman # Date 1117908328 0 # Node ID b83593f0515d786785f25525ce5b8cc3b823f779 # Parent 67de0f04e17e6563987aef10637effd56e00c5f9 (popup_get_selection): Click not in menu deactivates menu. diff -r 67de0f04e17e -r b83593f0515d src/xmenu.c --- a/src/xmenu.c Sat Jun 04 10:24:11 2005 +0000 +++ b/src/xmenu.c Sat Jun 04 18:05:28 2005 +0000 @@ -1235,6 +1235,10 @@ if (event.type == ButtonRelease && dpyinfo->display == event.xbutton.display) { + /* If the click is not on the menu, deactivate the menu. */ + if (x_any_window_to_frame (dpyinfo, event.xexpose.window)) + popup_activated_flag = 0; + dpyinfo->grabbed &= ~(1 << event.xbutton.button); #ifdef USE_MOTIF /* Pretending that the event came from a Btn1Down seems the only way to convince Motif to