From 5833abbbd11dca718379863cb2fb5c2423f5d7e7 Mon Sep 17 00:00:00 2001 From: trianta <56975502+Trimutex@users.noreply.github.com> Date: Sun, 3 Nov 2024 08:59:46 -0600 Subject: xwayland: minor fixups for stability (#8323) * xwayland: add inline safe closing of fds and fix LOCK_FILE_MODE permissions * xwayland: auto recreate xwayland instance if it crashes * xwayland: delay auto-restart until later --- src/xwayland/XWM.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/xwayland/XWM.cpp') diff --git a/src/xwayland/XWM.cpp b/src/xwayland/XWM.cpp index 248813bf..87fc34e4 100644 --- a/src/xwayland/XWM.cpp +++ b/src/xwayland/XWM.cpp @@ -13,6 +13,7 @@ #include "../defines.hpp" #include "../Compositor.hpp" #include "../protocols/core/Seat.hpp" +#include "../managers/eventLoop/EventLoopManager.hpp" #include "../managers/SeatManager.hpp" #include "../protocols/XWaylandShell.hpp" #include "../protocols/core/Compositor.hpp" @@ -691,6 +692,8 @@ int CXWM::onEvent(int fd, uint32_t mask) { Debug::log(CRIT, "XWayland has yeeten the xwm off?!"); g_pXWayland->pWM.reset(); g_pXWayland->pServer.reset(); + // Attempt to create fresh instance + g_pEventLoopManager->doLater([]() { g_pXWayland = std::make_unique(true); }); return 0; } -- cgit v1.2.3