gnome-session/gnome-session-exit-when-lost-name-on-bus.patch
Bjørn Lie 479e124aad Accepting request 956301 from home:xiaoguang_wang:branches:GNOME:Factory
- Add back gnome-session-exit-when-lost-name-on-bus.patch:
  gnome-session exit immediately when lost name on bus
  (bsc#1175622 glgo!GNOME/gnome-session!60, bsc#1188882).

OBS-URL: https://build.opensuse.org/request/show/956301
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-session?expand=0&rev=337
2022-02-21 15:42:08 +00:00

41 lines
1.5 KiB
Diff

Index: gnome-session-41.3/gnome-session/gsm-manager.c
===================================================================
--- gnome-session-41.3.orig/gnome-session/gsm-manager.c
+++ gnome-session-41.3/gnome-session/gsm-manager.c
@@ -1850,6 +1850,16 @@ gsm_manager_set_failsafe (GsmManager *ma
}
gboolean
+gsm_manager_get_dbus_disconnected (GsmManager *manager)
+{
+ GsmManagerPrivate *priv = gsm_manager_get_instance_private (manager);
+
+ g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);
+
+ return priv->dbus_disconnected;
+}
+
+gboolean
gsm_manager_get_failsafe (GsmManager *manager)
{
GsmManagerPrivate *priv = gsm_manager_get_instance_private (manager);
Index: gnome-session-41.3/gnome-session/main.c
===================================================================
--- gnome-session-41.3.orig/gnome-session/main.c
+++ gnome-session-41.3/gnome-session/main.c
@@ -83,8 +83,12 @@ on_name_lost (GDBusConnection *connectio
gpointer data)
{
if (connection == NULL) {
- g_warning ("Lost name on bus: %s", name);
- gsm_fail_whale_dialog_we_failed (TRUE, TRUE, NULL);
+ if (gsm_manager_get_dbus_disconnected (manager))
+ gsm_quit ();
+ else {
+ g_warning ("Lost name on bus: %s", name);
+ gsm_fail_whale_dialog_we_failed (TRUE, TRUE, NULL);
+ }
} else {
g_debug ("Calling name lost callback function");