From 95c21540395a9b16c74e7dfd7fdda2e47f34af26 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 12 Jan 2023 14:18:31 +0100 Subject: [PATCH] wayland: Drop HAVE_XSETIOERROREXITHANDLER checks This define was dropped by commit 0e8aaebc00f (xwayland: Make XSetIOErrorExitHandler() mandatory), but some #ifdef checks were brought back by commit 36f30341acb (wayland: Add a prepare-shutdown signal). Since there's no define anymore in config.h, these pieces of code were unintentionally disabled, and a meta_get_display() call be also left over. Remove the ifdefs and update the code to build again. Fixes: 36f30341acb - wayland: Add a prepare-shutdown signal Part-of: --- src/wayland/meta-xwayland.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index 9faeab297..564aad4cb 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -515,13 +515,11 @@ x_io_error_exit (Display *display, } } -#ifdef HAVE_XSETIOERROREXITHANDLER static void x_io_error_exit_noop (Display *display, void *data) { } -#endif void meta_xwayland_override_display_number (int number) @@ -1013,23 +1011,20 @@ static void meta_xwayland_shutdown (MetaWaylandCompositor *compositor) { MetaXWaylandManager *manager = &compositor->xwayland_manager; -#ifdef HAVE_XSETIOERROREXITHANDLER - MetaDisplay *display = meta_get_display (); + MetaContext *context = meta_wayland_compositor_get_context (compositor); + MetaDisplay *display = meta_context_get_display (context); MetaX11Display *x11_display; -#endif char path[256]; g_cancellable_cancel (manager->xserver_died_cancellable); XSetIOErrorHandler (x_io_error_noop); -#ifdef HAVE_XSETIOERROREXITHANDLER x11_display = display->x11_display; if (x11_display) { XSetIOErrorExitHandler (meta_x11_display_get_xdisplay (x11_display), x_io_error_exit_noop, NULL); } -#endif meta_xwayland_terminate (manager);