[gdm/no-udev-after-timeout: 3/3] local-display-factory: Stop listening to udev events when necessary
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/no-udev-after-timeout: 3/3] local-display-factory: Stop listening to udev events when necessary
- Date: Tue, 22 Mar 2022 14:19:48 +0000 (UTC)
commit e8cfd0991c3a6b6d74c5b672b3ab80493e893a0c
Author: Ray Strode <rstrode redhat com>
Date: Tue Mar 22 10:16:58 2022 -0400
local-display-factory: Stop listening to udev events when necessary
At the moment we still listen for udev events after we've determined
the system has settled (or a timeout has happened).
This means if there is a udev event late, the login screen could get
brought back up while the user is using the system.
This commit fixes that.
daemon/gdm-local-display-factory.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 7de7b99cf..7363a0d8c 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -710,6 +710,10 @@ udev_is_settled (GdmLocalDisplayFactory *factory)
g_debug ("GdmLocalDisplayFactory: udev has %ssettled enough for graphics.", is_settled? "" : "not ");
g_list_free_full (devices, g_object_unref);
+
+ if (is_settled)
+ g_clear_signal_handler (&factory->uevent_handler_id, factory->gudev_client);
+
return is_settled;
}
#endif
@@ -1287,9 +1291,6 @@ on_uevent (GUdevClient *client,
if (!udev_is_settled (factory))
return;
- g_signal_handler_disconnect (factory->gudev_client, factory->uevent_handler_id);
- factory->uevent_handler_id = 0;
-
gdm_settings_direct_reload ();
ensure_display_for_seat (factory, "seat0");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]