aboutsummaryrefslogtreecommitdiff
path: root/backend/x11/output.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2021-01-17 18:05:38 -0500
committerSimon Ser <contact@emersion.fr>2021-01-18 21:07:11 +0100
commit966e65393560fea6db84fb42019fa27127975cdc (patch)
tree491d4c8e62319744e4bbf5df1733475f4eba203c /backend/x11/output.c
parent04d89a8bc5c5b0db0ae24ca3e2b35f5632ed6d23 (diff)
backend/x11: set a blank cursor rather than hiding globally
This actually simplifies the logic since we no longer have to wait for enter/leave events, and also improves the UX when e.g. handling a crash with gdb attached. See #2659
Diffstat (limited to 'backend/x11/output.c')
-rw-r--r--backend/x11/output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c
index fabe9e98..fe178b72 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -381,11 +381,13 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
// The X11 protocol requires us to set a colormap and border pixel if the
// depth doesn't match the root window's
- uint32_t mask = XCB_CW_BORDER_PIXEL | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP;
+ uint32_t mask = XCB_CW_BORDER_PIXEL | XCB_CW_EVENT_MASK |
+ XCB_CW_COLORMAP | XCB_CW_CURSOR;
uint32_t values[] = {
0,
XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY,
x11->colormap,
+ x11->cursor,
};
output->win = xcb_generate_id(x11->xcb);
xcb_create_window(x11->xcb, x11->depth->depth, output->win,
@@ -402,8 +404,6 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
XCB_INPUT_XI_EVENT_MASK_BUTTON_PRESS |
XCB_INPUT_XI_EVENT_MASK_BUTTON_RELEASE |
XCB_INPUT_XI_EVENT_MASK_MOTION |
- XCB_INPUT_XI_EVENT_MASK_ENTER |
- XCB_INPUT_XI_EVENT_MASK_LEAVE |
XCB_INPUT_XI_EVENT_MASK_TOUCH_BEGIN |
XCB_INPUT_XI_EVENT_MASK_TOUCH_END |
XCB_INPUT_XI_EVENT_MASK_TOUCH_UPDATE,