mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
layout: Fix view_offset value when moving column
This commit is contained in:
@@ -961,9 +961,8 @@ impl<W: LayoutElement> Workspace<W> {
|
|||||||
let column = self.columns.remove(self.active_column_idx);
|
let column = self.columns.remove(self.active_column_idx);
|
||||||
self.columns.insert(new_idx, column);
|
self.columns.insert(new_idx, column);
|
||||||
|
|
||||||
// FIXME: should this be different when always centering?
|
// Preserve the camera position when moving to the left.
|
||||||
self.view_offset =
|
self.view_offset = current_x - self.column_x(self.active_column_idx);
|
||||||
self.compute_new_view_offset_for_column(current_x, self.active_column_idx);
|
|
||||||
|
|
||||||
self.activate_column(new_idx);
|
self.activate_column(new_idx);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user