diff options
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, |