Backport fix for starting headless

Resolves: #2116363
This commit is contained in:
Jonas Ådahl 2023-02-13 20:11:34 +01:00
parent 67080c8704
commit 21f3fd3f4a
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From 187b851530f5e76786784ec9df235304c8ddede8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 4 Aug 2021 19:46:34 +0200
Subject: [PATCH] st/icon: Only get resource-scale after peeking theme node
If an actor is not on any stage view, then it doesn't have a valid
resource scale, which will hit an assert later.
When that is the case (for example when running headless), we expect
that there is no valid theme node (yet) either, so simply moving
the clutter_actor_get_resource_scale() call after peeking at the
theme node is enough to avoid the crash.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4522
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1935>
---
src/st/st-icon.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/st/st-icon.c b/src/st/st-icon.c
index 0405d85259..e4d6e05f94 100644
--- a/src/st/st-icon.c
+++ b/src/st/st-icon.c
@@ -462,6 +462,8 @@ st_icon_update (StIcon *icon)
resource_scale = clutter_actor_get_resource_scale (CLUTTER_ACTOR (icon));
+ resource_scale = clutter_actor_get_resource_scale (CLUTTER_ACTOR (icon));
+
stage = clutter_actor_get_stage (CLUTTER_ACTOR (icon));
context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage));
g_object_get (context, "scale-factor", &paint_scale, NULL);
--
2.31.1

View File

@ -2,7 +2,7 @@
Name: gnome-shell
Version: 40.10
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Window management and application launching for GNOME
License: GPLv2+
@ -53,6 +53,7 @@ Patch50: 0001-window-tracker-Emit-tracked-windows-changed-on-title.patch
Patch51: 0001-magnifier-Request-window-relative-coordinates-for-fo.patch
Patch52: 0001-osk-layouts-Replace-SS-extra-key-with.patch
Patch53: 0001-po-Update-translations.patch
Patch54: 0001-st-icon-Only-get-resource-scale-after-peeking-theme-.patch
%define eds_version 3.33.1
%define gnome_desktop_version 3.35.91
@ -271,6 +272,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de
%{_mandir}/man1/gnome-shell.1*
%changelog
* Mon Feb 13 2023 Jonas Ådahl <jadahl@redhat.com> - 40.10-10
- Backport fix for starting headless
Resolves: #2116363
* Tue Feb 07 2023 Florian Müllner <fmuellner@redhat.com> - 40.10-9
- Fix resetting auth prompt
Resolves: #2166226