From 032b2fd8798fce727010cb30b3cc00a5f45523a3 Mon Sep 17 00:00:00 2001 From: clotodex Date: Sat, 24 May 2025 23:46:33 +0200 Subject: [PATCH] hyprscrolling: fix viewport should follow movewindowto (#359) --- hyprscrolling/Scrolling.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hyprscrolling/Scrolling.cpp b/hyprscrolling/Scrolling.cpp index 3a3a2a1..36e29d3 100644 --- a/hyprscrolling/Scrolling.cpp +++ b/hyprscrolling/Scrolling.cpp @@ -1030,6 +1030,7 @@ void CScrollingLayout::moveWindowTo(PHLWINDOW w, const std::string& dir, bool si DATA->column->remove(w); COL->add(DATA); + WS->centerCol(COL); } else if (dir == "r") { const auto COL = WS->next(DATA->column.lock()); @@ -1039,8 +1040,11 @@ void CScrollingLayout::moveWindowTo(PHLWINDOW w, const std::string& dir, bool si // make a new one const auto NEWCOL = WS->add(); NEWCOL->add(DATA); - } else + WS->centerCol(NEWCOL); + } else { COL->add(DATA); + WS->centerCol(COL); + } } else if (dir == "t" || dir == "u") DATA->column->up(DATA);