summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2021-12-28 09:28:04 +0800
committerPo Lu <luangruo@yahoo.com>2021-12-28 09:28:04 +0800
commit0f9ec379eb8ae4ca228b87145edf04d6c8e88516 (patch)
treecafe65a8b5dbda8c8d8f3313b2672471638ed9e8 /src
parentfb9b7b70f55dd49d3019a9c69663076e942d857e (diff)
downloademacs-0f9ec379eb8ae4ca228b87145edf04d6c8e88516.tar.gz
emacs-0f9ec379eb8ae4ca228b87145edf04d6c8e88516.tar.bz2
emacs-0f9ec379eb8ae4ca228b87145edf04d6c8e88516.zip
Only rely on passive device grabs on XI2
* src/xterm.c (xi_grab_or_ungrab_device): Remove function. (handle_one_xevent): Stop setting non-passive grabs.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 9a4f5d39e2e..698c1eba8b7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -620,40 +620,6 @@ xi_find_touch_point (struct xi_device_t *device, int detail)
#endif /* XI_TouchBegin */
static void
-xi_grab_or_ungrab_device (struct xi_device_t *device,
- struct x_display_info *dpyinfo,
- Window window)
-{
- XIEventMask mask;
- ptrdiff_t l = XIMaskLen (XI_LASTEVENT);
- unsigned char *m;
- mask.mask = m = alloca (l);
- memset (m, 0, l);
- mask.mask_len = l;
-
- XISetMask (m, XI_ButtonPress);
- XISetMask (m, XI_ButtonRelease);
- XISetMask (m, XI_Motion);
- XISetMask (m, XI_Enter);
- XISetMask (m, XI_Leave);
-
- if (device->grab
-#if defined USE_MOTIF || defined USE_LUCID
- && !popup_activated ()
-#endif
- )
- {
- XIGrabDevice (dpyinfo->display, device->device_id, window,
- CurrentTime, None, GrabModeAsync,
- GrabModeAsync, True, &mask);
- }
- else
- {
- XIUngrabDevice (dpyinfo->display, device->device_id, CurrentTime);
- }
-}
-
-static void
xi_reset_scroll_valuators_for_device_id (struct x_display_info *dpyinfo, int id)
{
struct xi_device_t *device = xi_device_from_id (dpyinfo, id);
@@ -10500,8 +10466,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
device->grab &= ~(1 << xev->detail);
}
- xi_grab_or_ungrab_device (device, dpyinfo, xev->event);
-
if (f)
f->mouse_moved = false;