Репозитории ALT
S: | 45.0.1-alt2 |
5.1: | 2.26.1-alt5.M51.2 |
4.1: | 2.20.7-alt1.M41.1 |
4.0: | 2.18.4-alt1 |
3.0: | 2.6.0.9-alt1 |
Другие репозитории
Upstream: | 2.20.4 |
Группа :: Графические оболочки/GNOME
Пакет: gdm
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: gdm-3.30-up-70861874.patch
Скачать
Скачать
commit 708618746683ea086068e2498fd1c69917c6189a
Author: Ray Strode <rstrode@redhat.com>
Date: Thu Aug 30 16:09:02 2018 -0400
gdm-wayland-session,gdm-x-session: register after delay
Right now gdm-x-session registers with GDM as soon as the
X server is started, and gdm-wayland-session registers as
soon as the session is started.
Ideally registration wouldn't happen until the session
says things started successfully.
This commit inches us toward that ideal but adding a little
timeout before proceeding with registration.
A future commit will add a new xsession file key to allow
us to know whether or not the session manager of the session
supports doing registration.
diff --git a/daemon/gdm-wayland-session.c b/daemon/gdm-wayland-session.c
index 94f49e19..de1991b3 100644
--- a/daemon/gdm-wayland-session.c
+++ b/daemon/gdm-wayland-session.c
@@ -454,6 +454,21 @@ on_sigterm (State *state)
return G_SOURCE_CONTINUE;
}
+static gboolean
+on_registration_delay_complete (State *state)
+{
+ gboolean ret;
+
+ ret = register_display (state, state->cancellable);
+
+ if (!ret) {
+ g_printerr ("Unable to register display with display manager\n");
+ g_main_loop_quit (state->main_loop);
+ }
+
+ return G_SOURCE_REMOVE;
+}
+
int
main (int argc,
char **argv)
@@ -528,13 +543,7 @@ main (int argc,
goto out;
}
- ret = register_display (state, state->cancellable);
-
- if (!ret) {
- g_printerr ("Unable to register display with display manager\n");
- exit_status = EX_SOFTWARE;
- goto out;
- }
+ g_timeout_add_seconds (2, (GSourceFunc) on_registration_delay_complete, state);
g_main_loop_run (state->main_loop);
diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c
index 3b2fcef4..412999cf 100644
--- a/daemon/gdm-x-session.c
+++ b/daemon/gdm-x-session.c
@@ -810,6 +810,21 @@ on_sigterm (State *state)
return G_SOURCE_CONTINUE;
}
+static gboolean
+on_registration_delay_complete (State *state)
+{
+ gboolean ret;
+
+ ret = register_display (state, state->cancellable);
+
+ if (!ret) {
+ g_printerr ("Unable to register display with display manager\n");
+ g_main_loop_quit (state->main_loop);
+ }
+
+ return G_SOURCE_REMOVE;
+}
+
int
main (int argc,
char **argv)
@@ -896,14 +911,6 @@ main (int argc,
goto out;
}
- ret = register_display (state, state->cancellable);
-
- if (!ret) {
- g_printerr ("Unable to register display with display manager\n");
- exit_status = EX_SOFTWARE;
- goto out;
- }
-
ret = spawn_session (state, run_script, state->cancellable);
if (!ret) {
@@ -912,6 +919,8 @@ main (int argc,
goto out;
}
+ g_timeout_add_seconds (2, (GSourceFunc) on_registration_delay_complete, state);
+
g_main_loop_run (state->main_loop);
/* Only use exit status of session if we're here because it exit */