From 38f2b1122feb7ceb9a1bea82553d643935187a60 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 26 Aug 2008 14:23:25 +0000 Subject: [PATCH] (Fx_popup_menu, Fx_popup_dialog, w32_menu_show): Ensure mouse is not grabbed after menu is finished. --- src/ChangeLog | 5 +++++ src/w32menu.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2fac842fc4a..d43e8652b4f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-08-26 Jason Rumney + + * w32menu.c (Fx_popup_menu, Fx_popup_dialog, w32_menu_show): Ensure + mouse is not grabbed after menu is finished. + 2008-08-26 Juanma Barranquero * editfns.c (Ffield_string_no_properties): Fix typo in docstring. diff --git a/src/w32menu.c b/src/w32menu.c index 1dbb2229e5a..be3668017e0 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -812,6 +812,7 @@ cached information about equivalent key sequences. */) if (NILP (position)) { discard_menu_items (); + FRAME_X_DISPLAY_INFO (f)->grabbed = 0; UNGCPRO; return Qnil; } @@ -825,6 +826,7 @@ cached information about equivalent key sequences. */) if (current_popup_menu) { discard_menu_items (); + FRAME_X_DISPLAY_INFO (f)->grabbed = 0; UNGCPRO; return Qnil; } @@ -837,6 +839,7 @@ cached information about equivalent key sequences. */) UNBLOCK_INPUT; discard_menu_items (); + FRAME_X_DISPLAY_INFO (f)->grabbed = 0; #endif /* HAVE_MENUS */ @@ -959,6 +962,7 @@ otherwise it is "Question". */) UNBLOCK_INPUT; discard_menu_items (); + FRAME_X_DISPLAY_INFO (f)->grabbed = 0; if (error_name) error (error_name); return selection; @@ -1931,6 +1935,7 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) /* Clean up extraneous mouse events which might have been generated during the call. */ discard_mouse_events (); + FRAME_X_DISPLAY_INFO (f)->grabbed = 0; /* Free the widget_value objects we used to specify the contents. */ free_menubar_widget_value_tree (first_wv); -- 2.39.5