[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 997ce9eb3d: Avoid dismissing GTK+ popup menus upon wheel movement
From: |
Po Lu |
Subject: |
master 997ce9eb3d: Avoid dismissing GTK+ popup menus upon wheel movement |
Date: |
Wed, 18 May 2022 02:56:20 -0400 (EDT) |
branch: master
commit 997ce9eb3d65089f4d924c7e5377f1b3bf0c2c13
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Avoid dismissing GTK+ popup menus upon wheel movement
* src/xterm.c (handle_one_xevent): Don't forward XI button
events for wheel buttons to GTK+ when a popup menu is active.
---
src/xterm.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index c24de0f185..b5fbb474ec 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -18328,9 +18328,17 @@ handle_one_xevent (struct x_display_info *dpyinfo,
g_object_ref (copy->button.window);
- if (popup_activated ()
- && xev->evtype == XI_ButtonRelease)
- goto XI_OTHER;
+ if (popup_activated ())
+ {
+ /* GTK+ popup menus don't respond to core buttons
+ after Button3, so don't dismiss popup menus upon
+ wheel movement here either. */
+ if (xev->detail > 3)
+ *finish = X_EVENT_DROP;
+
+ if (xev->evtype == XI_ButtonRelease)
+ goto XI_OTHER;
+ }
#endif
#ifdef HAVE_XINPUT2_1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 997ce9eb3d: Avoid dismissing GTK+ popup menus upon wheel movement,
Po Lu <=