Skip to content

frame: Use a systemd transient unit to manage mutter-x11-frames lifetime

mutter-x11-frames needs to be stay around when we have x11 windows, and should be restored if it crashes.

Mutter was handling this manually, but systemd can be better at this, so use a transient unit to launch the frames if mutter is compiled with systemd support.

Few notes:

  • This could work also without libsystemd, but given that have_systemd implies a requirement of the library at meson level, I'm just using that check without adding an extra HAVE_SYSTEMD definition.
  • We don't follow the launched job to ensure that it's running, we could do that but we can safely assume that if it's launched, then we're good, however let me know if we prefer to follow the while JobRemoved(done) and then check if the unit is running too.

Merge request reports