Commit 41769214 authored by Ray Strode's avatar Ray Strode

local-display-factory: Remove same VT so don't switch check

We avoid changing to the login screen vt if we're already on it,
but the call is racy since we react to vt changes concurrently
with logind (who we query for the active vt).

This check drops the active vt check since it's pointless and
getting in the way.
parent c71bc5d6
......@@ -432,8 +432,7 @@ create_display (GdmLocalDisplayFactory *factory,
GdmDisplayStore *store;
GdmDisplay *display = NULL;
char *active_session_id = NULL;
int ret;
g_autofree char *login_session_id = NULL;
g_debug ("GdmLocalDisplayFactory: %s login display for seat %s requested",
session_type? : "X11", seat_id);
......@@ -450,11 +449,6 @@ create_display (GdmLocalDisplayFactory *factory,
return NULL;
ret = sd_seat_get_active (seat_id, &active_session_id, NULL);
if (ret == 0) {
char *login_session_id = NULL;
/* If we already have a login window, switch to it */
if (gdm_get_login_window_session_id (seat_id, &login_session_id)) {
GdmDisplay *display;
......@@ -463,18 +457,11 @@ create_display (GdmLocalDisplayFactory *factory,
(gpointer) login_session_id);
if (display != NULL && gdm_display_get_status (display) == GDM_DISPLAY_MANAGED) {
if (g_strcmp0 (active_session_id, login_session_id) != 0) {
g_debug ("GdmLocalDisplayFactory: session %s found, activating.",
gdm_activate_session_by_id (factory->priv->connection, seat_id, login_session_id);
g_clear_pointer (&login_session_id, g_free);
g_clear_pointer (&active_session_id, g_free);
return NULL;
g_clear_pointer (&login_session_id, g_free);
g_clear_pointer (&active_session_id, g_free);
g_debug ("GdmLocalDisplayFactory: Adding display on seat %s", seat_id);
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