From 69f9b366435c713af122a634f4293b493d78db0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 23 Mar 2021 16:43:52 +0100 Subject: [PATCH] xwayland: Pass the manager object to XSetIOErrorExitHandler This means we can avoid going through global singletons in the handler. Part-of: --- src/wayland/meta-xwayland.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index ff5150d01..8789cbdd8 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -635,8 +635,7 @@ static void x_io_error_exit (Display *display, void *data) { - MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default (); - MetaXWaylandManager *manager = &compositor->xwayland_manager; + MetaXWaylandManager *manager = data; g_warning ("Xwayland just died, attempting to recover"); manager->xserver_grace_period_id = @@ -1271,7 +1270,7 @@ meta_xwayland_complete_init (MetaDisplay *display, */ XSetIOErrorHandler (x_io_error); #ifdef HAVE_XSETIOERROREXITHANDLER - XSetIOErrorExitHandler (xdisplay, x_io_error_exit, display); + XSetIOErrorExitHandler (xdisplay, x_io_error_exit, manager); #endif g_signal_connect (display, "x11-display-closing",