From a105b5f215ce1b2637b9bc92583ed965d2e8e4aa Mon Sep 17 00:00:00 2001 From: bbb651 <53972231+bbb651@users.noreply.github.com> Date: Wed, 13 Mar 2024 04:46:18 +0200 Subject: [PATCH] Wayland: Remove bogus `wl_surface::commit`s on resize (with integer scaling) (#9245) Release Notes: - N/A This prevents a crash on sway (on older versions without fractional scaling). This means the resize is delayed until the next this we present a frame, we need to investigate if this is the correct this to do. --- crates/gpui/src/platform/linux/wayland/client.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/gpui/src/platform/linux/wayland/client.rs b/crates/gpui/src/platform/linux/wayland/client.rs index 05da84481d..b2988bc5f8 100644 --- a/crates/gpui/src/platform/linux/wayland/client.rs +++ b/crates/gpui/src/platform/linux/wayland/client.rs @@ -417,7 +417,6 @@ impl Dispatch for WaylandClientState { } window.rescale(scale as f32); window.surface.set_buffer_scale(scale as i32); - window.surface.commit(); } wl_surface::Event::Leave { output } => { // We use `PreferredBufferScale` instead to set the scale if it's available @@ -435,12 +434,10 @@ impl Dispatch for WaylandClientState { } window.rescale(scale as f32); window.surface.set_buffer_scale(scale as i32); - window.surface.commit(); } wl_surface::Event::PreferredBufferScale { factor } => { window.rescale(factor as f32); surface.set_buffer_scale(factor); - window.surface.commit(); } _ => {} }