cursor-renderer/native: Handle early cursor texture changes

We create the cursor view data when we update the cursor, but allow the
texture to be realized earlier than that. The texture change listener
invalidates the hw cursor validity state, but since it's initialized to
invalid, the hardware cursor will still be correctly handled.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859>
This commit is contained in:
Jonas Ådahl 2024-11-22 14:06:48 +01:00 committed by Sebastian Wick
parent 35e5ae718a
commit 8fc1bddf3b

View File

@ -423,6 +423,9 @@ invalidate_cursor_gpu_state (MetaCursorRenderer *cursor_renderer,
CursorStageView *cursor_stage_view; CursorStageView *cursor_stage_view;
cursor_stage_view = get_cursor_stage_view (view); cursor_stage_view = get_cursor_stage_view (view);
if (!cursor_stage_view)
continue;
cursor_stage_view->is_hw_cursor_valid = FALSE; cursor_stage_view->is_hw_cursor_valid = FALSE;
} }
} }