aboutsummaryrefslogtreecommitdiff
path: root/src/layout/workspace.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-05-11 08:26:49 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-05-11 08:26:49 +0400
commit34bcc6ea9369fda19f4fb776e59f37e5dafc0051 (patch)
tree01a93ed2c0e8e95ca3bad020dece55c45e71065d /src/layout/workspace.rs
parent9dfa121b8e31082314d1c9347a60ef2e596494cb (diff)
downloadniri-34bcc6ea9369fda19f4fb776e59f37e5dafc0051.tar.gz
niri-34bcc6ea9369fda19f4fb776e59f37e5dafc0051.tar.bz2
niri-34bcc6ea9369fda19f4fb776e59f37e5dafc0051.zip
Split get resize data from update
Diffstat (limited to 'src/layout/workspace.rs')
-rw-r--r--src/layout/workspace.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs
index 1b6b14ff..a069abbf 100644
--- a/src/layout/workspace.rs
+++ b/src/layout/workspace.rs
@@ -1189,13 +1189,15 @@ impl<W: LayoutElement> Workspace<W> {
let tile = &mut col.tiles[tile_idx];
let window = tile.window_mut();
- let resize = serial.and_then(|serial| window.interactive_resize_data(serial));
+ let resize = window.interactive_resize_data();
+
+ if let Some(serial) = serial {
+ window.update_interactive_resize(serial);
+ }
// If this was the last resize commit, this function will now return None. This way we
// can animate the window into view after the last resize commit.
- let resize_still_ongoing = serial
- .and_then(|serial| window.interactive_resize_data(serial))
- .is_some();
+ let resize_still_ongoing = window.interactive_resize_data().is_some();
if let Some(resize) = resize {
// If this is an interactive resize commit of an active window, then we need to