summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-08-16 21:11:03 +0800
committerPo Lu <luangruo@yahoo.com>2022-08-16 21:11:50 +0800
commitb4879603fd8f9c8e82e30c5fbb65fa63d8166ee4 (patch)
tree1e22ea48430d56aa01474bb0c2d2d485f8c6e2cb /src/xfns.c
parent81ff64d3ca8d6e43e976f209399d2a0e9b4a7dd8 (diff)
downloademacs-b4879603fd8f9c8e82e30c5fbb65fa63d8166ee4.tar.gz
Fix XInput hierarchy events not being delivered in daemon mode
* src/xfns.c (setup_xi_event_mask): Stop selecting for device hierarchy events. * src/xterm.c (xi_select_hierarchy_events, x_term_init): Select those here instead, on the default root window.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 6ed93ee42ca..a275e3e11a8 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3773,14 +3773,11 @@ setup_xi_event_mask (struct frame *f)
memset (m, 0, l);
#endif
- mask.deviceid = XIAllDevices;
-
- XISetMask (m, XI_PropertyEvent);
- XISetMask (m, XI_HierarchyChanged);
- XISetMask (m, XI_DeviceChanged);
#ifdef HAVE_XINPUT2_2
if (FRAME_DISPLAY_INFO (f)->xi2_version >= 2)
{
+ mask.deviceid = XIAllDevices;
+
XISetMask (m, XI_TouchBegin);
XISetMask (m, XI_TouchUpdate);
XISetMask (m, XI_TouchEnd);
@@ -3792,11 +3789,12 @@ setup_xi_event_mask (struct frame *f)
XISetMask (m, XI_GesturePinchEnd);
}
#endif
+
+ XISelectEvents (FRAME_X_DISPLAY (f),
+ FRAME_X_WINDOW (f),
+ &mask, 1);
}
#endif
- XISelectEvents (FRAME_X_DISPLAY (f),
- FRAME_X_WINDOW (f),
- &mask, 1);
#ifndef HAVE_XINPUT2_1
FRAME_X_OUTPUT (f)->xi_masks = selected;