diff options
author | Po Lu <luangruo@yahoo.com> | 2022-10-21 19:19:33 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-10-21 19:19:48 +0800 |
commit | ea70e545c90e0cbfe3ea33c31ba3ef4f3487c32c (patch) | |
tree | 84597e41e5fecc497010b3ea76525e70d5c0991a /src/xmenu.c | |
parent | 4b40b790ae003032daa612807bc59e17f2c29dca (diff) | |
download | emacs-ea70e545c90e0cbfe3ea33c31ba3ef4f3487c32c.tar.gz emacs-ea70e545c90e0cbfe3ea33c31ba3ef4f3487c32c.tar.bz2 emacs-ea70e545c90e0cbfe3ea33c31ba3ef4f3487c32c.zip |
Fix delivery of window manager ping events during menu
* oldXMenu/Activate.c (XMenuActivateSetExposeFunction)
(XMenuActivate):
* oldXMenu/XMenu.h: Remove expose functions.
* src/msdos.h (XMenuSetAEQ): Remove no longer used function.
* src/xmenu.c (x_menu_expose_event): Delete function.
(x_menu_dispatch_event): New function.
(x_menu_show): Set it as the XMenu event handler.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r-- | src/xmenu.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index 9d35e3529fb..d9660a6910f 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -294,10 +294,13 @@ x_menu_translate_generic_event (XEvent *event) #endif #if !defined USE_X_TOOLKIT && !defined USE_GTK -static void -x_menu_expose_event (XEvent *event) +static int +x_menu_dispatch_event (XEvent *event) { x_dispatch_event (event, event->xexpose.display); + + /* The return doesn't really matter. */ + return 0; } #endif #endif /* ! MSDOS */ @@ -2747,21 +2750,22 @@ x_menu_show (struct frame *f, int x, int y, int menuflags, y += 1.5 * height/ (maxlines + 2); } - XMenuSetAEQ (menu, true); XMenuSetFreeze (menu, true); pane = selidx = 0; #ifndef MSDOS DEFER_SELECTIONS; - XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f)); + XMenuActivateSetWaitFunction (x_menu_wait_for_event, + FRAME_X_DISPLAY (f)); + XMenuEventHandler (x_menu_dispatch_event); + /* When the input extension is in use, the owner_events grab will report extension events on frames, which the XMenu library does not normally understand. */ #ifdef HAVE_XINPUT2 XMenuActivateSetTranslateFunction (x_menu_translate_generic_event); #endif - XMenuActivateSetExposeFunction (x_menu_expose_event); #endif record_unwind_protect_ptr (pop_down_menu, |