diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-08-22 14:36:47 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-08-22 14:40:40 +0300 |
| commit | cf357d7058910864018c3e3702a9723194fce916 (patch) | |
| tree | 6f93e6d1928a8f887e87f9fc22bb54206219b3fe /src/layout/workspace.rs | |
| parent | 618fa08aa5649e867c24db5ae941ca7f5064eeca (diff) | |
| download | niri-cf357d7058910864018c3e3702a9723194fce916.tar.gz niri-cf357d7058910864018c3e3702a9723194fce916.tar.bz2 niri-cf357d7058910864018c3e3702a9723194fce916.zip | |
Implement window resize throttling
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 85ba7b46..8f0ae6e3 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -15,7 +15,7 @@ use smithay::utils::{Logical, Point, Rectangle, Scale, Serial, Size, Transform}; use super::closing_window::{ClosingWindow, ClosingWindowRenderElement}; use super::tile::{Tile, TileRenderElement}; -use super::{InteractiveResizeData, LayoutElement, Options}; +use super::{ConfigureIntent, InteractiveResizeData, LayoutElement, Options}; use crate::animation::Animation; use crate::input::swipe_tracker::SwipeTracker; use crate::niri_render_elements; @@ -2759,7 +2759,15 @@ impl<W: LayoutElement> Workspace<W> { ); win.set_bounds(bounds); - win.send_pending_configure(); + let intent = win.configure_intent(); + + if matches!( + intent, + ConfigureIntent::CanSend | ConfigureIntent::ShouldSend + ) { + win.send_pending_configure(); + } + win.refresh(); } } |
