gentoo-ebuilds/gnome-base/gnome-session/files/exclude-gnome-shell-from-queryendSession-and-endSession.patch
zyxhere💭 5aa97cb4be
gnome-base/gnome-session: exclude gnome-shell from session query
Or else on systemd the user can't logout of the session, on OpenRC they
technically can (all the apps will get killed except gnome-shell) but
gnome-shell will show up as an unresponsive program and the session will
fail to end i.e the user can't logout. Only needed with the backported
patch for the bug with <gnome-shell-49.

Bug: https://bugs.gentoo.org/959295
Signed-off-by: zyxhere💭 <zyx@envs.net>
Part-of: https://github.com/gentoo/gentoo/pull/44493
Closes: https://github.com/gentoo/gentoo/pull/44493
Signed-off-by: Sam James <sam@gentoo.org>
2025-11-05 16:31:20 +00:00

40 lines
1.5 KiB
Diff

From 51eeea93291bf5f36ac99e528a22401cd17e0e23 Mon Sep 17 00:00:00 2001
From: Adrian Vovk <adrianvovk@gmail.com>
Date: Wed, 4 Jun 2025 14:00:32 -0400
Subject: [PATCH] Exclude gnome-shell from QueryEndSession and EndSession
This is a temporary hack until we drop builtin session management from
gnome-session and can rely only on systemd session startup
---
gnome-session/gsm-manager.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index f7bb26e6..743a372e 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -821,6 +821,10 @@ _client_end_session (GsmClient *client,
gboolean ret;
GError *error;
+ // HACK, but it's temporary until we drop builtin session startup.
+ if (g_strcmp0 ("org.gnome.Shell.desktop", gsm_client_peek_app_id (client)) == 0)
+ return FALSE;
+
error = NULL;
ret = gsm_client_end_session (client, data->flags, &error);
if (! ret) {
@@ -1004,6 +1008,10 @@ _client_query_end_session (const char *id,
gboolean ret;
GError *error;
+ // HACK, but it's temporary until we drop builtin session startup.
+ if (g_strcmp0 ("org.gnome.Shell.desktop", gsm_client_peek_app_id (client)) == 0)
+ return FALSE;
+
error = NULL;
ret = gsm_client_query_end_session (client, data->flags, &error);
if (! ret) {
--
GitLab