diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-09-13 11:33:36 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-09-13 11:33:36 +0100 |
| commit | b884544ee63b4c3b3b150ff69cf24c90058c2777 (patch) | |
| tree | 8bcc1ad77b9238ecddab0f22c3b3343c46ced8b4 /src/managers/KeybindManager.cpp | |
| parent | 6b1ac659e005042a6970ffc489aef71e0875af15 (diff) | |
input: don't refocus on switched workspace on the same monitor
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index b86a2844..e8bb3e74 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -801,7 +801,6 @@ void CKeybindManager::changeworkspace(std::string args) { // the current workspace will instead switch to the previous. static auto* const PBACKANDFORTH = &g_pConfigManager->getConfigValuePtr("binds:workspace_back_and_forth")->intValue; static auto* const PALLOWWORKSPACECYCLES = &g_pConfigManager->getConfigValuePtr("binds:allow_workspace_cycles")->intValue; - static auto* const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue; const auto PMONITOR = g_pCompositor->m_pLastMonitor; const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); @@ -871,10 +870,7 @@ void CKeybindManager::changeworkspace(std::string args) { } else pWorkspaceToChangeTo->rememberPrevWorkspace(PCURRENTWORKSPACE); - if (auto PLASTWINDOW = pWorkspaceToChangeTo->getLastFocusedWindow(); PLASTWINDOW && *PFOLLOWMOUSE == 1) - g_pCompositor->warpCursorTo(PLASTWINDOW->middle()); - - g_pInputManager->simulateMouseMovement(); + g_pInputManager->sendMotionEventsToFocused(); } void CKeybindManager::fullscreenActive(std::string args) { @@ -1964,9 +1960,9 @@ void CKeybindManager::moveWindowIntoGroup(CWindow* pWindow, CWindow* pWindowInDi } void CKeybindManager::moveWindowOutOfGroup(CWindow* pWindow, const std::string& dir) { - static auto* const BFOCUSREMOVEDWINDOW = &g_pConfigManager->getConfigValuePtr("misc:group_focus_removed_window")->intValue; - const auto PWINDOWPREV = pWindow->getGroupPrevious(); - eDirection direction; + static auto* const BFOCUSREMOVEDWINDOW = &g_pConfigManager->getConfigValuePtr("misc:group_focus_removed_window")->intValue; + const auto PWINDOWPREV = pWindow->getGroupPrevious(); + eDirection direction; switch (dir[0]) { case 't': |
