smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Send an event, if Xwayland exits unexpectedly

Open LogicalOverflow opened this issue 1 year ago • 1 comments

Since #1350, the XWaylandEvent::Error event is only sent if an error occurs during Xwayland startup, instead of the XWaylandEvent::Exited event, which was also sent if it exits/crashes later on (for testing, I just killed the Xwayland process).

Looking through the code, I couldn't find a way to get notified, if Xwayland exits. Smithay does notice, that Xwayland exits, logging an error (ERROR smithay::utils::x11rb: Event thread exiting due to connection error The X11 server closed the connection)

My use-case is, that I would like to restart Xwayland, if it crashes. Re-adding the XWaylandEvent::Exited and sending it if the connection to the X11 server is closed would resolve this.

LogicalOverflow avatar May 01 '24 10:05 LogicalOverflow

Re-adding the XWaylandEvent::Exited and sending it if the connection to the X11 server is closed would resolve this.

Yeah, that should be re-added.

Drakulix avatar May 02 '24 10:05 Drakulix