diff options
-rw-r--r-- | backend/wayland/output.c | 5 | ||||
-rw-r--r-- | backend/wayland/seat.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c index bd17fa20..b234c6a0 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -419,8 +419,9 @@ static void output_destroy(struct wlr_output *wlr_output) { } void update_wl_output_cursor(struct wlr_wl_output *output) { - if (output->backend->pointer && output->enter_serial) { - wl_pointer_set_cursor(output->backend->pointer, output->enter_serial, + struct wlr_wl_pointer *pointer = output->backend->current_pointer; + if (pointer && pointer->output == output && output->enter_serial) { + wl_pointer_set_cursor(pointer->wl_pointer, output->enter_serial, output->cursor.surface, output->cursor.hotspot_x, output->cursor.hotspot_y); } diff --git a/backend/wayland/seat.c b/backend/wayland/seat.c index a23a4c91..cce5c0dc 100644 --- a/backend/wayland/seat.c +++ b/backend/wayland/seat.c @@ -48,6 +48,7 @@ static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer, struct wlr_wl_output *output = wl_surface_get_user_data(surface); assert(output); struct wlr_wl_pointer *pointer = output_get_pointer(output); + assert(!backend->current_pointer || backend->current_pointer == pointer); output->enter_serial = serial; backend->current_pointer = pointer; |