summaryrefslogtreecommitdiff
path: root/src/menu.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-10-21 21:31:54 +0800
committerPo Lu <luangruo@yahoo.com>2022-10-21 21:32:34 +0800
commit693443bbf7d87e5508fe109f35d81e064400f3db (patch)
treec1e9f29df0dea5b313f92846cc5fdc62e34f6ade /src/menu.c
parent3245b17a0fd846470d63a24bcab3b093a3100b89 (diff)
downloademacs-693443bbf7d87e5508fe109f35d81e064400f3db.tar.gz
Fix various menu problems
* src/menu.c (x_popup_menu_1): Cancel hourglass timer before displaying popup. * src/xterm.c (x_show_hourglass): Avoid displaying hourglass cursor during a popup. (handle_one_xevent): Under X Toolkit and GTK+ 2.x builds with XInput 2, clear the mouse face upon a core LeaveNotify; these can be generated by menu grabs. (x_wm_set_size_hint): Fix Motif build warning.
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/menu.c b/src/menu.c
index c52e9258a15..87c5536bad5 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1391,6 +1391,15 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
run_hook (Qx_pre_popup_menu_hook);
+ /* Cancel the hourglass timer. Depending on how the show_menu_hook
+ is implemented, the hourglass window can either be mapped (or on
+ non-X systems, the hourglass cursor can be defined) either while
+ the menu is active, or while it is deactivated. Both situations
+ lead to annoying cursor and/or screen flicker and a failure to
+ detect input immediately after a popup menu generated by Custom
+ is unmapped. */
+ cancel_hourglass ();
+
/* Display them in a menu, but not if F is the initial frame that
doesn't have its hooks set (e.g., in a batch session), because
such a frame cannot display menus. */