Take screenshots on the Xvfb server, not on the Wayland desktop

winit prefers Wayland when WAYLAND_DISPLAY is set, so `xvfb-run` in a
Wayland session still opened the window on the desktop, where the
compositor chose its size. That looked like the X server ignoring the
requested size. Remove the variable for the screenshot run, and size the
Xvfb screen like the window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
selikhovandClaude Opus 5.5 committed 2026-10-03 01:56:31 +03:00
1 parent 2e4f282732
commit 6d1dd65c17
3 files changed
+24 -14

No files matched your search

+2 -1
View File
@@ -167,7 +167,8 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
}
}
// A window manager can refuse the size set before the window opened,
// so ask again once it is up (a bare X server ignores both).
// so ask again once it is up. (Under `xvfb-run` in a Wayland session,
// remove WAYLAND_DISPLAY, or winit opens the window on the desktop.)
let resize = switches.window_size.map(|(w, h)| {
let weak = ui.as_weak();
let timer = slint::Timer::default();