Merge pull request #2220 from sigboe/warp-on-scroll-toggle

sway/workspaces: setting to not warp to window when scrolling
This commit is contained in:
Alexis Rouillard
2023-07-04 22:42:53 +02:00
committed by GitHub
3 changed files with 12 additions and 0 deletions

View File

@ -327,11 +327,17 @@ bool Workspaces::handleScroll(GdkEventScroll *e) {
return true;
}
}
if (!config_["warp-on-scroll"].asBool()) {
ipc_.sendCmd(IPC_COMMAND, fmt::format("mouse_warping none"));
}
try {
ipc_.sendCmd(IPC_COMMAND, fmt::format(workspace_switch_cmd_, "--no-auto-back-and-forth", name));
} catch (const std::exception &e) {
spdlog::error("Workspaces: {}", e.what());
}
if (!config_["warp-on-scroll"].asBool()) {
ipc_.sendCmd(IPC_COMMAND, fmt::format("mouse_warping container"));
}
return true;
}