diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-31 14:21:33 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-31 14:33:02 +0300 |
| commit | e10b968eb085a4db1493c349e5411421d59f88af (patch) | |
| tree | 6485bbf33cb4809df8be0e72c044a5c122f9b009 /src/layout/scrolling.rs | |
| parent | 3b1bf34e21652b2ba6ce621226c05f74dccbefbb (diff) | |
| download | niri-e10b968eb085a4db1493c349e5411421d59f88af.tar.gz niri-e10b968eb085a4db1493c349e5411421d59f88af.tar.bz2 niri-e10b968eb085a4db1493c349e5411421d59f88af.zip | |
layout: Reset unfullscreen view offset when starting interactive resize
Diffstat (limited to 'src/layout/scrolling.rs')
| -rw-r--r-- | src/layout/scrolling.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index 9bb190a4..0fbf4037 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -3284,10 +3284,11 @@ impl<W: LayoutElement> ScrollingSpace<W> { return false; } - let col = self + let (col_idx, col) = self .columns .iter_mut() - .find(|col| col.contains(&window)) + .enumerate() + .find(|(_, col)| col.contains(&window)) .unwrap(); if col.is_fullscreen { @@ -3311,6 +3312,14 @@ impl<W: LayoutElement> ScrollingSpace<W> { self.view_offset.stop_anim_and_gesture(); + // If this is the active column, clear the stored unfullscreen view offset in case one of + // the tiles in the column is still pending unfullscreen. Normally it is cleared and + // applied in update_window(), but we skip that during interactive resize because the view + // is frozen. + if col_idx == self.active_column_idx { + self.view_offset_before_fullscreen = None; + } + true } |
