Skip to content

xwayland: Don't remove /tmp/.X11-unix/X0 when running tests

Jonas Ådahl requested to merge jadahl/mutter:wip/dont-rm-display-socket into main

When Xwayland was not initalized, we'd still clean things up. What this accidentally meant was that the uninitialized display number 0 was cleanud up, which very likely was main display of the host session.

What this meant in practice was that /tmp/.X11-unix/X0 was often removed, causing every Flatpak X11 application to fail to start until Xwayland was restarted nad the X0 socket file was restored.

Fix this in two ways: firstly only shutdown Xwayland if we ever started it, i.e. if the X11 display policy was not 'disabled'. This should fix the issue most of the times. Secondly only clean up the socket if it was ever initialized. This should fix things if the socket creation failed, as if it did, the name would be set.

Merge request reports