aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Cella <guido@guidocella.xyz>2020-12-20 14:29:45 +0100
committerGuido Cella <guido@guidocella.xyz>2020-12-20 14:57:41 +0100
commitf80f08848b8b7e08ed2f20c7f0a8675a3b4df394 (patch)
tree12e5a821a6b2e766d9550b1253df2cd6c1d39d99
parent444a5f9dec52161f61d8a42644f7b6625d9aabcd (diff)
ensure that xwayland cursor defaults to left_ptr
Don't show an X cursor when closing an Xwayland window or with certain dropdowns. Based on https://github.com/djpohly/dwl/pull/32
-rw-r--r--dwl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dwl.c b/dwl.c
index 773e04a..7a12817 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2561,6 +2561,13 @@ xwaylandready(struct wl_listener *listener, void *data)
/* assign the one and only seat */
wlr_xwayland_set_seat(xwayland, seat);
+ /* Set the default XWayland cursor to match the rest of dwl. */
+ struct wlr_xcursor *xcursor = wlr_xcursor_manager_get_xcursor(cursor_mgr, "left_ptr", 1);
+ wlr_xwayland_set_cursor(xwayland,
+ xcursor->images[0]->buffer, xcursor->images[0]->width * 4,
+ xcursor->images[0]->width, xcursor->images[0]->height,
+ xcursor->images[0]->hotspot_x, xcursor->images[0]->hotspot_y);
+
xcb_disconnect(xc);
}