hyprscrolling: fix viewport should follow movewindowto (#359)

This commit is contained in:
clotodex 2025-05-24 23:46:33 +02:00 committed by GitHub
parent c04dee3d0c
commit 032b2fd879
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);