[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 85ac627ef4: Fix extraneous quit events processing GTK native inpu
From: |
Po Lu |
Subject: |
master 85ac627ef4: Fix extraneous quit events processing GTK native input inside popups |
Date: |
Fri, 13 May 2022 03:32:01 -0400 (EDT) |
branch: master
commit 85ac627ef4096a2d303f1d37c45da05dea1b7781
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix extraneous quit events processing GTK native input inside popups
* src/gtkutil.c (xg_widget_key_press_event_cb): Return
immediately if a popup is active.
* src/xterm.c (x_filter_event): Clear `xg_pending_quit_event' if
a popup is active.
---
src/gtkutil.c | 3 +++
src/xterm.c | 7 +++++++
2 files changed, 10 insertions(+)
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a2ab01d02c..11ccbbd668 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -6395,6 +6395,9 @@ xg_widget_key_press_event_cb (GtkWidget *widget, GdkEvent
*event,
if (!f)
return true;
+ if (popup_activated ())
+ return true;
+
#ifdef HAVE_XINPUT2
pending_keystroke_time
= FRAME_DISPLAY_INFO (f)->pending_keystroke_time;
diff --git a/src/xterm.c b/src/xterm.c
index 7a570de921..170f65d06f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -14014,6 +14014,13 @@ x_filter_event (struct x_display_info *dpyinfo, XEvent
*event)
result = xg_filter_key (f1, event);
unblock_input ();
+ /* Clear `xg_pending_quit_event' so we don't end up reacting to quit
+ events sent outside the main event loop (i.e. those sent from
+ inside a popup menu event loop). */
+
+ if (popup_activated ())
+ xg_pending_quit_event.kind = NO_EVENT;
+
if (result && f1)
/* There will probably be a GDK event generated soon, so
exercise the wire to make pselect return. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 85ac627ef4: Fix extraneous quit events processing GTK native input inside popups,
Po Lu <=