Merge pull request #3929 from xb-bx/master

sway/workspaces: Implement reverse-scroll
This commit is contained in:
Alexis Rouillard
2025-08-08 08:45:42 +02:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@ -443,10 +443,11 @@ bool Workspaces::handleScroll(GdkEventScroll *e) {
if (it == workspaces_.end()) {
return true;
}
bool reverse_scroll = config_["reverse-scroll"].isBool() && config_["reverse-scroll"].asBool();
if (dir == SCROLL_DIR::DOWN || dir == SCROLL_DIR::RIGHT) {
name = getCycleWorkspace(it, false);
name = getCycleWorkspace(it, reverse_scroll ? true : false);
} else if (dir == SCROLL_DIR::UP || dir == SCROLL_DIR::LEFT) {
name = getCycleWorkspace(it, true);
name = getCycleWorkspace(it, reverse_scroll ? false : true);
} else {
return true;
}