fix(multi-display): fix runtime directory race condition and SPICE display enabling

- Fix tmpfs race condition in daemon by mounting runtime directory explicitly
  before starting Sway, preventing sockets from being hidden when systemd-logind
  mounts over them later
- Fix enable-displays.py to use correct SpiceClientGLib API methods
  (update_display_enabled/update_display instead of set_display_enabled/set_display)
- Fix virt-viewer monitor-mapping to use 1-indexed client monitors
- Add virt-viewer config setup and automatic display enabling to test script
- Multi-display now works correctly with 3 QXL devices
This commit is contained in:
2026-01-10 08:23:50 +00:00
parent 7727fafeec
commit e02b5b7046
7 changed files with 86 additions and 15 deletions

View File

@@ -64,11 +64,11 @@ class SpiceDisplayEnabler:
print(f"Setting display {i}: {self.width}x{self.height} at ({x}, {y})")
try:
# Enable the display
self.main_channel.set_display_enabled(i, True)
# Enable the display using update_display_enabled (not set_display_enabled)
self.main_channel.update_display_enabled(i, True, False)
# Set display geometry (id, x, y, width, height)
self.main_channel.set_display(i, x, y, self.width, self.height)
# Set display geometry (id, x, y, width, height) using update_display
self.main_channel.update_display(i, x, y, self.width, self.height, False)
except Exception as e:
print(f" Error setting display {i}: {e}")