From 8994b4cee2cca4065de86f4ced48db07e7ba0a22 Mon Sep 17 00:00:00 2001 From: rasmusq Date: Sun, 16 Nov 2025 00:08:10 +0100 Subject: [PATCH] fix rows keep their position when left --- src/layout/horizontal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layout/horizontal.h b/src/layout/horizontal.h index ed95150..42d56a6 100644 --- a/src/layout/horizontal.h +++ b/src/layout/horizontal.h @@ -571,9 +571,10 @@ void dual_scroller(Monitor *m) { } // Position clients in the opposite row (independent scrolling) - // Find the first client in the opposite row and center it + // Keep their current positions to maintain scroll state int opposite_row_start = focus_in_top_row ? 1 : 0; if (opposite_row_start < n) { + // Find a reference client in the opposite row to anchor positioning c = tempClients[opposite_row_start]; bool in_top_row = (opposite_row_start % 2 == 0); unsigned int client_row_height = in_top_row ? top_row_height : bottom_row_height; @@ -584,7 +585,8 @@ void dual_scroller(Monitor *m) { target_geom.y = client_row_y; if (!c->isfullscreen && !c->ismaximizescreen) { - target_geom.x = m->w.x + (m->w.width - target_geom.width) / 2; + // Keep current X position to maintain scroll state + target_geom.x = c->geom.x; resize(c, target_geom, 0); }