|
|
e0b6b0 |
From fc3503f16e9de535d2a36b904720b360370f880f Mon Sep 17 00:00:00 2001
|
|
|
c90517 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
c90517 |
Date: Fri, 15 May 2020 10:08:24 -0400
|
|
|
e0b6b0 |
Subject: [PATCH 45/51] local-display-factory: Always force login screen to VT
|
|
|
c90517 |
1
|
|
|
c90517 |
|
|
|
c90517 |
These days we always want the login screen on VT 1, even
|
|
|
c90517 |
when it's created by user switching.
|
|
|
c90517 |
|
|
|
c90517 |
Unfortunately, since commit f843233ad the login screen
|
|
|
c90517 |
won't naturally pick VT 1 when user switching.
|
|
|
c90517 |
|
|
|
c90517 |
This commit forces it to make the right choice.
|
|
|
c90517 |
|
|
|
c90517 |
Closes https://gitlab.gnome.org/GNOME/gdm/-/issues/602
|
|
|
c90517 |
---
|
|
|
c90517 |
daemon/gdm-local-display-factory.c | 3 +++
|
|
|
c90517 |
1 file changed, 3 insertions(+)
|
|
|
c90517 |
|
|
|
c90517 |
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
|
|
|
c90517 |
index 7a013c694..a288f8765 100644
|
|
|
c90517 |
--- a/daemon/gdm-local-display-factory.c
|
|
|
c90517 |
+++ b/daemon/gdm-local-display-factory.c
|
|
|
c90517 |
@@ -197,84 +197,87 @@ store_display (GdmLocalDisplayFactory *factory,
|
|
|
c90517 |
gdm_display_store_add (store, display);
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
static gboolean
|
|
|
c90517 |
gdm_local_display_factory_use_wayland (void)
|
|
|
c90517 |
{
|
|
|
c90517 |
#ifdef ENABLE_WAYLAND_SUPPORT
|
|
|
c90517 |
gboolean wayland_enabled = FALSE;
|
|
|
c90517 |
if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled)) {
|
|
|
c90517 |
if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE) )
|
|
|
c90517 |
return TRUE;
|
|
|
c90517 |
}
|
|
|
c90517 |
#endif
|
|
|
c90517 |
return FALSE;
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
/*
|
|
|
c90517 |
Example:
|
|
|
c90517 |
dbus-send --system --dest=org.gnome.DisplayManager \
|
|
|
c90517 |
--type=method_call --print-reply --reply-timeout=2000 \
|
|
|
c90517 |
/org/gnome/DisplayManager/Manager \
|
|
|
c90517 |
org.gnome.DisplayManager.Manager.GetDisplays
|
|
|
c90517 |
*/
|
|
|
c90517 |
gboolean
|
|
|
c90517 |
gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *factory,
|
|
|
c90517 |
char **id,
|
|
|
c90517 |
GError **error)
|
|
|
c90517 |
{
|
|
|
c90517 |
gboolean ret;
|
|
|
c90517 |
GdmDisplay *display = NULL;
|
|
|
c90517 |
+ gboolean is_initial = FALSE;
|
|
|
c90517 |
|
|
|
c90517 |
g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE);
|
|
|
c90517 |
|
|
|
c90517 |
ret = FALSE;
|
|
|
c90517 |
|
|
|
c90517 |
g_debug ("GdmLocalDisplayFactory: Creating transient display");
|
|
|
c90517 |
|
|
|
c90517 |
#ifdef ENABLE_USER_DISPLAY_SERVER
|
|
|
c90517 |
display = gdm_local_display_new ();
|
|
|
c90517 |
if (gdm_local_display_factory_use_wayland ())
|
|
|
c90517 |
g_object_set (G_OBJECT (display), "session-type", "wayland", NULL);
|
|
|
c90517 |
+ is_initial = TRUE;
|
|
|
c90517 |
#else
|
|
|
c90517 |
if (display == NULL) {
|
|
|
c90517 |
guint32 num;
|
|
|
c90517 |
|
|
|
c90517 |
num = take_next_display_number (factory);
|
|
|
c90517 |
|
|
|
c90517 |
display = gdm_legacy_display_new (num);
|
|
|
c90517 |
}
|
|
|
c90517 |
#endif
|
|
|
c90517 |
|
|
|
c90517 |
g_object_set (display,
|
|
|
c90517 |
"seat-id", "seat0",
|
|
|
c90517 |
"allow-timed-login", FALSE,
|
|
|
c90517 |
+ "is-initial", is_initial,
|
|
|
c90517 |
NULL);
|
|
|
c90517 |
|
|
|
c90517 |
store_display (factory, display);
|
|
|
c90517 |
|
|
|
c90517 |
if (! gdm_display_manage (display)) {
|
|
|
c90517 |
display = NULL;
|
|
|
c90517 |
goto out;
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
if (! gdm_display_get_id (display, id, NULL)) {
|
|
|
c90517 |
display = NULL;
|
|
|
c90517 |
goto out;
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
ret = TRUE;
|
|
|
c90517 |
out:
|
|
|
c90517 |
/* ref either held by store or not at all */
|
|
|
c90517 |
g_object_unref (display);
|
|
|
c90517 |
|
|
|
c90517 |
return ret;
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
static gboolean
|
|
|
c90517 |
finish_display_on_seat_if_waiting (GdmDisplayStore *display_store,
|
|
|
c90517 |
GdmDisplay *display,
|
|
|
c90517 |
const char *seat_id)
|
|
|
c90517 |
{
|
|
|
c90517 |
if (gdm_display_get_status (display) != GDM_DISPLAY_WAITING_TO_FINISH)
|
|
|
c90517 |
return FALSE;
|
|
|
c90517 |
|
|
|
c90517 |
--
|
|
|
e0b6b0 |
2.27.0
|
|
|
c90517 |
|