diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-14 08:47:32 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-03-14 08:50:29 +0300 |
| commit | fd3b1f2b6c9117a6a52c8f452501559a7c5b2b6d (patch) | |
| tree | 267c44c05d22f86d81132797ccb867b54229fa26 | |
| parent | ee0e2c7f1b4edae42d2f1b05466adbdffe156e61 (diff) | |
| download | niri-fd3b1f2b6c9117a6a52c8f452501559a7c5b2b6d.tar.gz niri-fd3b1f2b6c9117a6a52c8f452501559a7c5b2b6d.tar.bz2 niri-fd3b1f2b6c9117a6a52c8f452501559a7c5b2b6d.zip | |
layout: Preserve previous view offset on consume-left
| -rw-r--r-- | src/layout/scrolling.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index 8a86f7bf..a6df4045 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -1711,8 +1711,12 @@ impl<W: LayoutElement> ScrollingSpace<W> { if source_tile_was_active { // Make sure the previous (target) column is activated so the animation looks right. - self.activate_prev_column_on_removal = - Some(self.view_offset.stationary() + offset.x); + // + // However, if it was already going to be activated, leave the offset as is. This + // improves the workflow that has become common with tabbed columns: open a new + // window, then immediately consume it left as a new tab. + self.activate_prev_column_on_removal + .get_or_insert(self.view_offset.stationary() + offset.x); } offset.x += self.columns[source_col_idx].render_offset().x; |
