diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-06-06 06:00:21 -0400 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-06-06 06:00:21 -0400 |
commit | d700bd2d7cf8848ba4c7ed84a454c074a27d9bb3 (patch) | |
tree | babde69e8ef87157cb157777fa49a01d10b25b96 | |
parent | 398c6b66c6a3391bbbd07bb66a5ce239d2ff79ec (diff) |
wlr_seat_pointer: cursor surfaces are always mapped
-rw-r--r-- | types/seat/wlr_seat_pointer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/types/seat/wlr_seat_pointer.c b/types/seat/wlr_seat_pointer.c index 686a7a03..b5eb84f7 100644 --- a/types/seat/wlr_seat_pointer.c +++ b/types/seat/wlr_seat_pointer.c @@ -70,8 +70,15 @@ struct wlr_seat_client *wlr_seat_client_from_pointer_resource( return wl_resource_get_user_data(resource); } +static void pointer_cursor_surface_handle_commit(struct wlr_surface *surface) { + if (wlr_surface_has_buffer(surface)) { + wlr_surface_map(surface); + } +} + static const struct wlr_surface_role pointer_cursor_surface_role = { .name = "wl_pointer-cursor", + .commit = pointer_cursor_surface_handle_commit, }; static void pointer_set_cursor(struct wl_client *client, @@ -91,6 +98,8 @@ static void pointer_set_cursor(struct wl_client *client, surface_resource, WL_POINTER_ERROR_ROLE)) { return; } + + pointer_cursor_surface_handle_commit(surface); } struct wlr_seat_pointer_request_set_cursor_event event = { |