From e217a91fec93bf7ddcffaf57b533ff8f49180fcd Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Wed, 15 Jan 2025 19:55:29 +0100 Subject: [PATCH] floating: Throttle resizes --- src/shell/layout/floating/grabs/resize.rs | 4 +++- src/shell/layout/floating/mod.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shell/layout/floating/grabs/resize.rs b/src/shell/layout/floating/grabs/resize.rs index 6163630a..edc39414 100644 --- a/src/shell/layout/floating/grabs/resize.rs +++ b/src/shell/layout/floating/grabs/resize.rs @@ -120,7 +120,9 @@ impl ResizeSurfaceGrab { }, self.last_window_size.as_global(), )); - self.window.configure(); + if self.window.latest_size_committed() { + self.window.configure(); + } false } diff --git a/src/shell/layout/floating/mod.rs b/src/shell/layout/floating/mod.rs index 97dc2b7e..5c96d6ff 100644 --- a/src/shell/layout/floating/mod.rs +++ b/src/shell/layout/floating/mod.rs @@ -990,7 +990,9 @@ impl FloatingLayout { geo.as_local() .to_global(self.space.outputs().next().unwrap()), ); - mapped.configure(); + if mapped.latest_size_committed() { + mapped.configure(); + } true }