Skip to content
  • Vlad Zahorodnii's avatar
    Survive Xwayland crashes · 19ad1725
    Vlad Zahorodnii authored
    If the Xwayland process crashes, it will bring down the entire session
    together with itself. Obviously, we don't want that. At least, Wayland
    clients should survive the crash.
    
    This change refactors relevant X11 parts to handle Xwayland crashes in a
    less fatal way.
    
    In order to handle Xwayland crashes better, a pair of start() and stop()
    methods had been introduced in the Xwayland class to allow starting and
    stopping the Xwayland process at any moment.
    
    If we detect that the Xwayland process has crashed, we will immediately
    stop the Xwayland server, which in its turn will deactivate the socket
    notifier and destroy all connected X11 clients. Unfortunately, a couple
    of subtle changes in X11Client::releaseWindow() and Unmanaged::release()
    had to be made to ensure that we are left with a valid state after the
    Xwayland server has been stopped.
    19ad1725