summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-08-31 15:48:38 -0400
committerRay Strode <rstrode@redhat.com>2018-08-31 17:05:53 -0400
commit49433d863842bde0a5d57f08c03e38d7bbe0dca7 (patch)
tree7b3e9be5bc70b9312f5f447a15841be6042425b1
parent365c58c0f4e4488496283005c5f800c27ad15d7c (diff)
downloadgdm-49433d863842bde0a5d57f08c03e38d7bbe0dca7.tar.gz
manager: don't kill initial-setup before starting user session on wayland
Right now we kill initial-setup before starting the session for the user initial-setup created. This is the right thing to do for Xorg, since Xorg can't be killed in the background, but it adds unncessary flicker for wayland. This commit checks if it's wayland and avoids killing it right away in that case.
-rw-r--r--daemon/gdm-manager.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index b1e2072c..986891bb 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1588,6 +1588,9 @@ on_start_user_session (StartUserSessionOperation *operation)
gboolean doing_initial_setup = FALSE;
GdmDisplay *display;
const char *session_id;
+#if defined(ENABLE_WAYLAND_SUPPORT) && defined(ENABLE_USER_DISPLAY_SERVER)
+ g_autofree char *display_session_type = NULL;
+#endif
g_debug ("GdmManager: start or jump to session");
@@ -1610,7 +1613,12 @@ on_start_user_session (StartUserSessionOperation *operation)
display = get_display_for_user_session (operation->session);
- g_object_get (G_OBJECT (display), "doing-initial-setup", &doing_initial_setup, NULL);
+ g_object_get (G_OBJECT (display),
+ "doing-initial-setup", &doing_initial_setup,
+#if defined(ENABLE_WAYLAND_SUPPORT) && defined(ENABLE_USER_DISPLAY_SERVER)
+ "session-type", &display_session_type,
+#endif
+ NULL);
session_id = gdm_session_get_conversation_session_id (operation->session,
operation->service_name);
@@ -1629,10 +1637,18 @@ on_start_user_session (StartUserSessionOperation *operation)
g_object_ref (display);
if (doing_initial_setup) {
- g_debug ("GdmManager: closing down initial setup display");
- gdm_display_stop_greeter_session (display);
- gdm_display_unmanage (display);
- gdm_display_finish (display);
+#if defined(ENABLE_WAYLAND_SUPPORT) && defined(ENABLE_USER_DISPLAY_SERVER)
+ if (g_strcmp0 (display_session_type, "wayland") == 0) {
+ g_debug ("GdmManager: closing down initial setup display in background");
+ g_object_set (G_OBJECT (display), "status", GDM_DISPLAY_WAITING_TO_FINISH, NULL);
+ }
+#endif
+ if (gdm_display_get_status (display) == GDM_DISPLAY_MANAGED) {
+ g_debug ("GdmManager: closing down initial setup display");
+ gdm_display_stop_greeter_session (display);
+ gdm_display_unmanage (display);
+ gdm_display_finish (display);
+ }
} else {
g_debug ("GdmManager: session has its display server, reusing our server for another login screen");
}