From 612248733cfbcf4188d99ea9c9f901f52a35f35a Mon Sep 17 00:00:00 2001 From: Raman Date: Sun, 19 Jul 2026 16:49:40 +0200 Subject: [PATCH] Fix overlay crash on Wayland from 0x0 initial window size OverlayInner.current_size started at Vec2::ZERO, so the deferred viewport was first built with an inner size of 0x0. Wayland rejects a 0x0 xdg_surface geometry ("invalid window geometry size (0x0)"), which leaves the wgpu surface unconfigured and panics with "Surface is not configured for presentation". X11 and Windows silently clamp the size, so the crash only shows on Wayland. Initialize current_size to the same min_inner_size (240x80) used when building the viewport. The overlay still resizes itself to its content on the first frame, so this only affects the very first size. Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 1 + src/app/overlay.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 848cb96..f36f561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Fixes - fixed auto refresh stopping to work when changing the logs path +- fixed the program crashing on Linux/Wayland when the overlay is switched on ## v1.4.0 ### Major Changes diff --git a/src/app/overlay.rs b/src/app/overlay.rs index 891ba5e..5178340 100644 --- a/src/app/overlay.rs +++ b/src/app/overlay.rs @@ -184,7 +184,10 @@ impl Overlay { Self(Arc::new(Mutex::new(OverlayInner { move_around: true, columns: COLUMNS.iter().cloned().collect(), - current_size: Vec2::ZERO, + // Must start non-zero: Wayland rejects a 0x0 xdg_surface geometry, + // which crashes wgpu ("Surface is not configured for presentation"). + // Matches the min_inner_size used when building the viewport below. + current_size: vec2(240.0, 80.0), data: Default::default(), position: None, show: false,