Skip to main content

establish_runtime_root

Function establish_runtime_root 

Source
pub fn establish_runtime_root() -> &'static Path
Expand description

Eagerly capture [HOST_RUNTIME_ROOT] from the current XDG_RUNTIME_DIR and return it.

The snapshot is otherwise taken lazily on the first MutterCompositor::new. Call this once at process startup — before any session is created and before anything can mutate XDG_RUNTIME_DIR — to pin the root to the pristine launcher value deterministically, rather than relying on new() happening first. Idempotent: subsequent calls (and new()) return the same captured value.