[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0f9ec379eb: Only rely on passive device grabs on XI2
From: |
Po Lu |
Subject: |
master 0f9ec379eb: Only rely on passive device grabs on XI2 |
Date: |
Mon, 27 Dec 2021 20:29:10 -0500 (EST) |
branch: master
commit 0f9ec379eb8ae4ca228b87145edf04d6c8e88516
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
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.
---
src/xterm.c | 36 ------------------------------------
1 file changed, 36 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 9a4f5d39e2..698c1eba8b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -619,40 +619,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)
{
@@ -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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0f9ec379eb: Only rely on passive device grabs on XI2,
Po Lu <=