From ae0791dbc3f5c3633f2f9a8ef37d1abae295545b Mon Sep 17 00:00:00 2001 From: IoI_xD Date: Thu, 23 Apr 2026 11:28:38 -0700 Subject: [PATCH] don't call wl_pointer_set_cursor on pointer_enteR --- src/backend/wayland.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/backend/wayland.c b/src/backend/wayland.c index ba1768c..8404792 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -471,7 +471,7 @@ static void zwp_pointer_constraints_v1_interface_destroy(struct _MwLLWayland* wa (void)data; } -static struct wl_surface* curSurface; +static struct wl_surface* curSurface = NULL; /* `wl_pointer.enter` callback */ static void pointer_enter(void* data, struct wl_pointer* wl_pointer, MwU32 serial, @@ -486,8 +486,6 @@ static void pointer_enter(void* data, struct wl_pointer* wl_pointer, MwU32 seria self->wayland.pointer_serial = serial; - wl_pointer_set_cursor(wl_pointer, serial, self->wayland.cursor.surface, 0, 0); - WAYLAND_EVENT_OP_END(self); }; @@ -1259,8 +1257,7 @@ static void wl_shm_interface_destroy(struct _MwLLWayland* wayland, wayland_proto static void update_buffer(MwLL self, struct _MwLLWaylandShmBuffer* buffer) { memcpy(buffer->buf, buffer->buf_back, buffer->buf_size); // Yes this is needed every time, it's how we fix weston. - if(self->wayland.configured) - wl_surface_attach(buffer->surface, buffer->shm_buffer, 0, 0); + wl_surface_attach(buffer->surface, buffer->shm_buffer, 0, 0); wl_surface_commit(buffer->surface); } @@ -2550,7 +2547,7 @@ static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) { /* If there's currently a pointer, set it up. (Otherwise, it'll be setup during the pointer enter event) */ if(handle->wayland.pointer != NULL) { - // wl_pointer_set_cursor(handle->wayland.pointer, handle->wayland.pointer_serial, handle->wayland.cursor.surface, 0, 0); + wl_pointer_set_cursor(handle->wayland.pointer, handle->wayland.pointer_serial, handle->wayland.cursor.surface, 0, 0); } }