diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-02 10:21:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-02 10:21:07 -0400 |
commit | 8b37e8f67a7ef659f884b59290c1c18ed9d64fec (patch) | |
tree | d7dd76d8814fd4ee1e14c7ba1d15e998c52d14f9 /backend/x11/backend.c | |
parent | 7a1e02be78bc9247681713ffda09bea7e0aa551f (diff) | |
parent | 7b88ace557f6aae4b7aa41b72263c628e637a892 (diff) |
Merge pull request #792 from emersion/x11-backend-blank-cursor
backend/x11: hide cursor
Diffstat (limited to 'backend/x11/backend.c')
-rw-r--r-- | backend/x11/backend.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/x11/backend.c b/backend/x11/backend.c index f598aea1..59b75a03 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -171,6 +171,15 @@ static bool wlr_x11_backend_start(struct wlr_backend *backend) { } } + // create a blank cursor + xcb_pixmap_t pix = xcb_generate_id(x11->xcb_conn); + xcb_create_pixmap(x11->xcb_conn, 1, pix, x11->screen->root, 1, 1); + + x11->cursor = xcb_generate_id(x11->xcb_conn); + xcb_create_cursor(x11->xcb_conn, x11->cursor, pix, pix, 0, 0, 0, 0, 0, 0, + 0, 0); + xcb_free_pixmap(x11->xcb_conn, pix); + #ifdef WLR_HAS_XCB_XKB const xcb_query_extension_reply_t *reply = xcb_get_extension_data(x11->xcb_conn, &xcb_xkb_id); @@ -239,6 +248,9 @@ static void wlr_x11_backend_destroy(struct wlr_backend *backend) { wlr_egl_finish(&x11->egl); + if (x11->cursor) { + xcb_free_cursor(x11->xcb_conn, x11->cursor); + } if (x11->xlib_conn) { XCloseDisplay(x11->xlib_conn); } |