diff options
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/scrolling.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index 48773110..04788bca 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -1226,6 +1226,7 @@ impl<W: LayoutElement> ScrollingSpace<W> { .find(|(_, col)| col.contains(window)) .unwrap(); let was_fullscreen = column.is_fullscreen(); + let prev_origin = column.tiles_origin(); let (tile_idx, tile) = column .tiles @@ -1295,6 +1296,18 @@ impl<W: LayoutElement> ScrollingSpace<W> { } } + // When a column goes between fullscreen and non-fullscreen, the tiles origin can change. + // The change comes from things like ignoring struts and hiding the tab indicator in + // fullscreen, so both in X and Y directions. + let column = &mut self.columns[col_idx]; + let new_origin = column.tiles_origin(); + let origin_delta = prev_origin - new_origin; + if origin_delta != Point::new(0., 0.) { + for (tile, _pos) in column.tiles_mut() { + tile.animate_move_from(origin_delta); + } + } + if col_idx == self.active_column_idx { // If offset == 0, then don't mess with the view or the gesture. Some clients (Firefox, // Chromium, Electron) currently don't commit after the ack of a configure that drops |
