Skip to content

Draft: Reconnect xwayland on compositor crashes and resend client information

David Edmundson requested to merge davidedmundson/xserver:reconnections into master

!!!!!!DRAFT!!!!!!!


In the event of a compositor crash or error these changes will reconnect to the new compositor and re-fetch seat information, outputs and then re-send any windows, active pointer constraints and alike. From an X11 POV it's as though we got a flurry of events at once, and then the X11 compositor got replaced.

See wayland-devel: https://lists.freedesktop.org/archives/wayland-devel/2021-August/041959.html


This both has a few code quirks to iron out and discuss plus it uses unreleased dependencies. Posting as Ofourdan wanted to share some comments.

Dependencies

You maybe don't need mesa if you force shm mode.

They need some touchup before making MRs.

Testing

Rootless mode: Rootless mode is challenging to test, as obviously you can't use -wm fd or -listen fd, so it requires compositor changes delegating the launching elsewhere. These are not shipped anywhere.

Rootfull mode is easier to test xwayland changes without any compiling.

kwin_wayland_wrapper (any stock release within the last 9 months) 
WAYLAND_DISPLAY=wayland-1 Xwayland :2
DISPLAY=:2 xterm
killall -9 kwin_wayland

Code wise I have some slight issues with the lifespan of Device objects outliving the Seat and the cursor sits in a weird middle ground across these that I'm not happy with. Rest is relatively trivial I think.

Edited by David Edmundson

Merge request reports

Loading