42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
|
From fac0854a4f25e90c26e7b1078a4a6ec305c53f66 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||
|
Date: Tue, 18 Feb 2025 17:43:36 +0100
|
||
|
Subject: [PATCH] cursor-renderer/native: Cast MetaGpu to MetaGpuKms only if it
|
||
|
is one
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Fixes crash in gnome-shell CSS styling test.
|
||
|
|
||
|
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4289>
|
||
|
---
|
||
|
src/backends/native/meta-cursor-renderer-native.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c
|
||
|
index f0c373e7dc..9b079be023 100644
|
||
|
--- a/src/backends/native/meta-cursor-renderer-native.c
|
||
|
+++ b/src/backends/native/meta-cursor-renderer-native.c
|
||
|
@@ -329,7 +329,7 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *cursor_renderer,
|
||
|
MetaRendererView *renderer_view = META_RENDERER_VIEW (view);
|
||
|
MetaCrtc *crtc = meta_renderer_view_get_crtc (renderer_view);
|
||
|
MetaCrtcNative *crtc_native = META_CRTC_NATIVE (crtc);
|
||
|
- MetaGpuKms *gpu_kms = META_GPU_KMS (meta_crtc_get_gpu (crtc));
|
||
|
+ MetaGpu *gpu = meta_crtc_get_gpu (crtc);
|
||
|
ClutterColorState *target_color_state =
|
||
|
clutter_stage_view_get_output_color_state (CLUTTER_STAGE_VIEW (view));
|
||
|
CursorStageView *cursor_stage_view = NULL;
|
||
|
@@ -339,7 +339,7 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *cursor_renderer,
|
||
|
g_assert (cursor_stage_view);
|
||
|
|
||
|
if (!META_IS_CRTC_KMS (crtc) ||
|
||
|
- !is_hw_cursor_available_for_gpu (gpu_kms) ||
|
||
|
+ !is_hw_cursor_available_for_gpu (META_GPU_KMS (gpu)) ||
|
||
|
!meta_crtc_native_is_hw_cursor_supported (crtc_native))
|
||
|
{
|
||
|
if (cursor_stage_view->has_hw_cursor)
|
||
|
--
|
||
|
2.48.1
|
||
|
|