Wayland: Remove bogus wl_surface::commits 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.
This commit is contained in:
bbb651 2024-03-13 04:46:18 +02:00 committed by GitHub
parent aeb2a98058
commit a105b5f215
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -417,7 +417,6 @@ impl Dispatch<wl_surface::WlSurface, ()> for WaylandClientState {
} }
window.rescale(scale as f32); window.rescale(scale as f32);
window.surface.set_buffer_scale(scale as i32); window.surface.set_buffer_scale(scale as i32);
window.surface.commit();
} }
wl_surface::Event::Leave { output } => { wl_surface::Event::Leave { output } => {
// We use `PreferredBufferScale` instead to set the scale if it's available // We use `PreferredBufferScale` instead to set the scale if it's available
@ -435,12 +434,10 @@ impl Dispatch<wl_surface::WlSurface, ()> for WaylandClientState {
} }
window.rescale(scale as f32); window.rescale(scale as f32);
window.surface.set_buffer_scale(scale as i32); window.surface.set_buffer_scale(scale as i32);
window.surface.commit();
} }
wl_surface::Event::PreferredBufferScale { factor } => { wl_surface::Event::PreferredBufferScale { factor } => {
window.rescale(factor as f32); window.rescale(factor as f32);
surface.set_buffer_scale(factor); surface.set_buffer_scale(factor);
window.surface.commit();
} }
_ => {} _ => {}
} }