SIGN IN SIGN UP

wayland: implement session management

If the compositor supports session management, the mpv window is always
added to a session. The user can manage multiple sessions by using
`--wayland-session=<human-readable-name>`. Human-readable names are
mapped to session ids via files under `~/.local/state/mpv/sessions`. The
file name is computed as a hash of XDG_CURRENT_DESKTOP and the
human-readable name.

If multiple mpv instances are started with the same session name, the
latter mpv instance takes over the session.

Upon session restoration, the mpv window is restored by the compositor
according to its state from the previous session. What that entails is
compositor policy.
J
Julian Orth committed
4c9262664c39f67682b876eb4331e9f2b8a7c44e
Parent: 98a6960
Committed by Dudemanguy <random342@airmail.cc> on 4/24/2026, 3:36:44 PM