From 09336d9adf57c55bdcd0a50755ac554237d6f833 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 14 Jan 2026 09:28:58 +0800 Subject: [PATCH] fix: chase wlr_xwayland_set_cursor arg change --- src/mango.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mango.c b/src/mango.c index 1d776be..2f07559 100644 --- a/src/mango.c +++ b/src/mango.c @@ -5940,11 +5940,13 @@ void xwaylandready(struct wl_listener *listener, void *data) { wlr_xwayland_set_seat(xwayland, seat); /* Set the default XWayland cursor to match the rest of dwl. */ - if ((xcursor = wlr_xcursor_manager_get_xcursor(cursor_mgr, "default", 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); + + if ((xcursor = wlr_xcursor_manager_get_xcursor(cursor_mgr, "default", 1))) { + struct wlr_xcursor_image *image = xcursor->images[0]; + struct wlr_buffer *buffer = wlr_xcursor_image_get_buffer(image); + wlr_xwayland_set_cursor(xwayland, buffer, xcursor->images[0]->hotspot_x, + xcursor->images[0]->hotspot_y); + } } static void setgeometrynotify(struct wl_listener *listener, void *data) {