[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e703735: Ignore XI_TouchBegin events on the GTK tool bar
From: |
Po Lu |
Subject: |
master e703735: Ignore XI_TouchBegin events on the GTK tool bar |
Date: |
Tue, 21 Dec 2021 02:00:19 -0500 (EST) |
branch: master
commit e70373538328dd071a73532878492ecb2fd1ee88
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Ignore XI_TouchBegin events on the GTK tool bar
* src/xterm.c (handle_one_xevent): Ignore TouchBegin events
that target the tool bar.
---
src/xterm.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 1dc6822..57c5616 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10878,7 +10878,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
case XI_TouchBegin:
{
struct xi_device_t *device;
- bool menu_bar_p = false;
+ bool menu_bar_p = false, tool_bar_p = false;
+#ifdef HAVE_GTK3
+ GdkRectangle test_rect;
+#endif
device = xi_device_from_id (dpyinfo, xev->deviceid);
x_display_set_last_user_time (dpyinfo, xev->time);
@@ -10893,9 +10896,19 @@ handle_one_xevent (struct x_display_info *dpyinfo,
#ifdef HAVE_GTK3
menu_bar_p = (f && FRAME_X_OUTPUT (f)->menubar_widget
&& xg_event_is_for_menubar (f, event));
+ if (f && FRAME_X_OUTPUT (f)->toolbar_widget)
+ {
+ test_rect.x = xev->event_x;
+ test_rect.y = xev->event_x;
+ test_rect.width = 1;
+ test_rect.height = 1;
+
+ tool_bar_p = gtk_widget_intersect (FRAME_X_OUTPUT
(f)->toolbar_widget,
+ &test_rect, NULL);
+ }
#endif
- if (!menu_bar_p)
+ if (!menu_bar_p && !tool_bar_p)
{
if (f && device->direct_p)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e703735: Ignore XI_TouchBegin events on the GTK tool bar,
Po Lu <=