diff options
author | Po Lu <luangruo@yahoo.com> | 2022-03-10 11:48:12 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-03-10 11:48:12 +0800 |
commit | 65fea3ff58cdb012340d7e5755188df213df480a (patch) | |
tree | 269f5f677f6a86b8b9e75eb01612c1830382b054 /src/gtkutil.c | |
parent | 4a845b2cd0e771b39b778daf4941e5c02fa8e6b8 (diff) | |
download | emacs-65fea3ff58cdb012340d7e5755188df213df480a.tar.gz emacs-65fea3ff58cdb012340d7e5755188df213df480a.tar.bz2 emacs-65fea3ff58cdb012340d7e5755188df213df480a.zip |
Fix menu bar activation on PGTK
* src/gtkutil.c (menu_bar_button_pressed_cb): Only update menu
bar if no menu is active, and the event window is not the widget
window itself. Also make menu in use.
* src/pgtkmenu.c (popup_deactivate_callback): Make menu not in
use.
* src/xdisp.c (redisplay_internal): Return if popup_activated
also on PGTK.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r-- | src/gtkutil.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index 2a647810886..1b4ecaf9492 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -3282,8 +3282,13 @@ menu_bar_button_pressed_cb (GtkWidget *widget, GdkEvent *event, { struct frame *f = user_data; - if (event->button.button < 4) - set_frame_menubar (f, true); + if (event->button.button < 4 + && event->button.window != gtk_widget_get_window (widget) + && !popup_activated ()) + { + pgtk_menu_set_in_use (true); + set_frame_menubar (f, true); + } return false; } |