tActively grab the pointer on the menu window - xmenu - drop-down menu for X11
(HTM) git clone git://git.z3bra.org/xmenu.git
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 9db050cb33f34dcdd6862d71240b7e1593bfcaa5
(DIR) parent b02590ceeb90f07ab4ffe23bfa71ae1c8d096e9a
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Thu, 21 Nov 2019 13:53:24 +0100
Actively grab the pointer on the menu window
This is made so no other application will receive our pointer events
on parents of the window , like one monitoring pointer events on the
root window.
Diffstat:
M xmenu.c | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/xmenu.c b/xmenu.c
t@@ -99,6 +99,10 @@ popwindow(int x, int y, int w, int h)
xcb_map_window(dpy, wid);
xcb_flush(dpy);
+ xcb_grab_pointer(dpy, 1, wid, XCB_EVENT_MASK_NO_EVENT,
+ XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC,
+ wid, XCB_NONE, XCB_CURRENT_TIME);
+
return 0;
}