From 8fc1bddf3bd42533bbb064f699d91f378d30804b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 22 Nov 2024 14:06:48 +0100 Subject: [PATCH] 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: --- src/backends/native/meta-cursor-renderer-native.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c index 0dada94eb..9f45be909 100644 --- a/src/backends/native/meta-cursor-renderer-native.c +++ b/src/backends/native/meta-cursor-renderer-native.c @@ -423,6 +423,9 @@ invalidate_cursor_gpu_state (MetaCursorRenderer *cursor_renderer, CursorStageView *cursor_stage_view; cursor_stage_view = get_cursor_stage_view (view); + if (!cursor_stage_view) + continue; + cursor_stage_view->is_hw_cursor_valid = FALSE; } }