wayland-rs icon indicating copy to clipboard operation
wayland-rs copied to clipboard

Difference between Smithay/wayland-server and C libwayland wrt display lock file naming

Open jonleivent opened this issue 1 year ago • 0 comments

Smithay/wayland-server/src/socket.rs ListeningSocket::bind_absolute uses PathBuf::with_extension to derive the lock file name from the display name. This means that given a display name like "wayland.0", it will use "wayland.lock" instead of "wayland.0.lock". C libwayland does a normal concatenation, so it will use "wayland.0.lock".

Most practical scenarios involving the lock file involve multiple identical (wrt options) invocations of the same Wayland compositor intended to be the only compositor for a particular user. In such cases, with_extension instead of normal concatenation would not make any difference.

However, it may make a difference in scenarios involving multiple distinct compositors, perhaps one compositor and one or more sub-compositors, with display names that differ only in their extension.

jonleivent avatar Sep 04 '24 21:09 jonleivent