Further fixes to menu event processing on no-toolkit builds
* src/xdisp.c (note_mouse_highlight): Return if a popup is activated under the no-toolkit build as well. * src/xmenu.c (pop_down_menu): Clear popup_activated_flag when not on MS-DOS. (x_menu_show): Set popup_activated_flag under X.
This commit is contained in:
parent
636322cfe0
commit
f85bdb4992
2 changed files with 9 additions and 1 deletions
|
@ -34912,7 +34912,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
|
|||
struct buffer *b;
|
||||
|
||||
/* When a menu is active, don't highlight because this looks odd. */
|
||||
#if defined (USE_X_TOOLKIT) || (defined (USE_GTK) && !defined (HAVE_PGTK)) || defined (HAVE_NS) || defined (MSDOS)
|
||||
#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) || defined (MSDOS)
|
||||
if (popup_activated ())
|
||||
return;
|
||||
#endif
|
||||
|
|
|
@ -2540,6 +2540,8 @@ pop_down_menu (void *arg)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Decrement the popup_activated_flag. */
|
||||
popup_activated_flag = 0;
|
||||
#endif /* HAVE_X_WINDOWS */
|
||||
|
||||
unblock_input ();
|
||||
|
@ -2791,6 +2793,12 @@ x_menu_show (struct frame *f, int x, int y, int menuflags,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
/* Increment the popup flag; this prevents nested popups from being
|
||||
displayed by user Lisp code in help-echo callbacks, and also
|
||||
prevents mouse face from being displayed. */
|
||||
popup_activated_flag = 1;
|
||||
#endif
|
||||
status = XMenuActivate (FRAME_X_DISPLAY (f), menu, &pane, &selidx,
|
||||
x, y, ButtonReleaseMask, &datap,
|
||||
menu_help_callback);
|
||||
|
|
Loading…
Add table
Reference in a new issue