From 196ac78ce159aaeb675c57e8cabb5747cbba3713 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 4 Jun 2005 18:09:16 +0000 Subject: [PATCH] (popup_get_selection): Click not in menu deactivates menu. --- src/ChangeLog | 4 ++++ src/xmenu.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 36650215350..c0466275d4a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-06-04 Richard M. Stallman + + * xmenu.c (popup_get_selection): Click not in menu deactivates menu. + 2005-06-04 Jan Dj,Ad(Brv * macmenu.c (cleanup_popup_menu): New function. diff --git a/src/xmenu.c b/src/xmenu.c index 6f758d12fc7..6e3a21604c1 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1235,6 +1235,10 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers) 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 -- 2.39.5