config/patches/base/gdm/fix-monitor-event-crash.patch

34 lines
1.3 KiB
Diff

diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 7de7b99cff5901458fb2155ede7c2aaf24a9fee6..b3335cd49915f2f8fecc666843e3c7262ab848f0 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -78,7 +78,7 @@ struct _GdmLocalDisplayFactory
gboolean seat0_graphics_check_timed_out;
guint seat0_graphics_check_timeout_id;
- guint uevent_handler_id;
+ gulong uevent_handler_id;
#if defined(ENABLE_USER_DISPLAY_SERVER)
unsigned int active_vt;
@@ -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");
}