Commit 1525c3cc authored by Ray Strode's avatar Ray Strode

Merge branch 'wip/initial-setup-flicker-fix' into 'master'

Wip/initial setup flicker fix

See merge request !42
parents c274ef84 49433d86
Pipeline #27905 passed with stage
in 4 minutes and 7 seconds
......@@ -978,6 +978,7 @@ gdm_create_greeter_launch_environment (const char *display_name,
GdmLaunchEnvironment *
gdm_create_initial_setup_launch_environment (const char *display_name,
const char *seat_id,
const char *session_type,
const char *display_hostname,
gboolean display_is_local)
{
......@@ -985,7 +986,7 @@ gdm_create_initial_setup_launch_environment (const char *display_name,
INITIAL_SETUP_USERNAME,
display_name,
seat_id,
NULL,
session_type,
INITIAL_SETUP_SESSION_MODE,
display_hostname,
display_is_local);
......
......@@ -77,6 +77,7 @@ GdmLaunchEnvironment *gdm_create_greeter_launch_environment (const char *display
gboolean display_is_local);
GdmLaunchEnvironment *gdm_create_initial_setup_launch_environment (const char *display_name,
const char *seat_id,
const char *session_type,
const char *display_hostname,
gboolean display_is_local);
GdmLaunchEnvironment *gdm_create_chooser_launch_environment (const char *display_name,
......
......@@ -115,9 +115,10 @@ gdm_legacy_display_prepare (GdmDisplay *display)
TRUE);
} else {
launch_environment = gdm_create_initial_setup_launch_environment (display_name,
seat_id,
NULL,
TRUE);
seat_id,
NULL,
NULL,
TRUE);
}
g_object_set (self, "launch-environment", launch_environment, NULL);
......
......@@ -110,11 +110,6 @@ gdm_local_display_prepare (GdmDisplay *display)
}
g_debug ("doing initial setup? %s", doing_initial_setup? "yes" : "no");
if (doing_initial_setup && g_strcmp0 (session_type, "wayland") == 0) {
g_debug ("initial setup doesn't have a wayland session, failing back to X11");
failed = TRUE;
goto out;
}
if (!doing_initial_setup) {
launch_environment = gdm_create_greeter_launch_environment (NULL,
......@@ -124,9 +119,10 @@ gdm_local_display_prepare (GdmDisplay *display)
TRUE);
} else {
launch_environment = gdm_create_initial_setup_launch_environment (NULL,
seat_id,
NULL,
TRUE);
seat_id,
session_type,
NULL,
TRUE);
}
g_object_set (self, "launch-environment", launch_environment, NULL);
......
......@@ -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");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment