From 4d05677e8d398b6fa144eae7a98ad4f2a54acb92 Mon Sep 17 00:00:00 2001 From: Pavel Belyavsky Date: Tue, 10 Dec 2024 23:55:05 +0300 Subject: config: add 'force' option for 'cursor:warp_on_change_workspace' (#8681) * config: add 'force' option for 'cursor:warp_on_change_workspace' * manager: throw the expression into the function arguments * config: fix description of `cursor:warp_on_change_workspace` --- src/managers/KeybindManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/managers/KeybindManager.cpp') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 025a7eb6..2eb04d41 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1202,12 +1202,12 @@ SDispatchResult CKeybindManager::changeworkspace(std::string args) { const static auto PWARPONWORKSPACECHANGE = CConfigValue("cursor:warp_on_change_workspace"); - if (*PWARPONWORKSPACECHANGE) { + if (*PWARPONWORKSPACECHANGE > 0) { auto PLAST = pWorkspaceToChangeTo->getLastFocusedWindow(); auto HLSurface = CWLSurface::fromResource(g_pSeatManager->state.pointerFocus.lock()); if (PLAST && (!HLSurface || HLSurface->getWindow())) - PLAST->warpCursor(); + PLAST->warpCursor(*PWARPONWORKSPACECHANGE == 2); } return {}; -- cgit v1.2.3