代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gdm 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 4d2bc475545fb03c6fbba71796da08a53ab0b58e Mon Sep 17 00:00:00 2001
From: lyn1001 <[email protected]>
Date: Sun, 7 Apr 2024 17:59:15 +0800
Subject: [PATCH] fix daemon Don't error on shutdown
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 39430a5..eecff1e 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -93,6 +93,7 @@ typedef struct _GdmDisplayPrivate
guint have_existing_user_accounts : 1;
guint doing_initial_setup : 1;
guint session_registered : 1;
+ guint shutting_down : 1;
GStrv supported_session_types;
} GdmDisplayPrivate;
@@ -119,6 +120,7 @@ enum {
PROP_DOING_INITIAL_SETUP,
PROP_SESSION_REGISTERED,
PROP_SUPPORTED_SESSION_TYPES,
+ PROP_SHUTTING_DOWN,
};
static void gdm_display_class_init (GdmDisplayClass *klass);
@@ -683,8 +685,7 @@ gdm_display_unmanage (GdmDisplay *self)
g_object_unref (priv->access_file);
priv->access_file = NULL;
}
-
- if (!priv->session_registered) {
+ if (!priv->session_registered && !priv->shutting_down) {
g_warning ("GdmDisplay: Session never registered, failing");
_gdm_display_set_status (self, GDM_DISPLAY_FAILED);
} else {
@@ -870,6 +871,16 @@ _gdm_display_set_session_registered (GdmDisplay *self,
priv->session_registered = registered;
}
+static void
+_gdm_display_set_shutting_down (GdmDisplay *self,
+ gboolean shutting_down)
+{
+ GdmDisplayPrivate *priv;
+
+ priv = gdm_display_get_instance_private (self);
+ priv->shutting_down = shutting_down;
+}
+
static void
_gdm_display_set_launch_environment (GdmDisplay *self,
GdmLaunchEnvironment *launch_environment)
@@ -981,6 +992,9 @@ gdm_display_set_property (GObject *object,
case PROP_SUPPORTED_SESSION_TYPES:
_gdm_display_set_supported_session_types (self, g_value_get_boxed (value));
break;
+ case PROP_SHUTTING_DOWN:
+ _gdm_display_set_shutting_down (self, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1062,6 +1076,9 @@ gdm_display_get_property (GObject *object,
case PROP_SUPPORTED_SESSION_TYPES:
g_value_set_boxed (value, priv->supported_session_types);
break;
+ case PROP_SHUTTING_DOWN:
+ g_value_set_boolean (value, priv->shutting_down);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1406,6 +1423,13 @@ gdm_display_class_init (GdmDisplayClass *klass)
"supported session types",
G_TYPE_STRV,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
+
+ g_object_class_install_property (object_class,
+ PROP_SHUTTING_DOWN,
+ g_param_spec_boolean ("shutting-down",
+ NULL, NULL,
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
static void
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 0e0f30c..e2c1890 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -2750,11 +2750,14 @@ unexport_display (const char *id,
}
static void
-finish_display (const char *id,
- GdmDisplay *display,
- GdmManager *manager)
+shut_down_display (const char *id,
+ GdmDisplay *display,
+ GdmManager *manager)
{
gdm_display_stop_greeter_session (display);
+
+ g_object_set (G_OBJECT (display), "shutting-down", TRUE, NULL);
+
if (gdm_display_get_status (display) == GDM_DISPLAY_MANAGED)
gdm_display_unmanage (display);
gdm_display_finish (display);
@@ -2806,7 +2809,7 @@ gdm_manager_dispose (GObject *object)
}
gdm_display_store_foreach (manager->display_store,
- (GdmDisplayStoreFunc) finish_display,
+ (GdmDisplayStoreFunc) shut_down_display,
manager);
gdm_display_store_clear (manager->display_store);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。