diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-10 15:15:40 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-10 15:15:40 +0000 |
| commit | c3f1dc3f526a7f94c37d72f8314bc4bce969f0d8 (patch) | |
| tree | 7a5ccc519780b0866ae94cf334aa940f91c670f8 /src/managers/KeybindManager.cpp | |
| parent | 62f4503f07066762af9546bb4a2acdd58b72d4bf (diff) | |
fix minor issues with move focus and follow mouse 0
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 3dd6488b..a71b040e 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -945,6 +945,7 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) { void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) { // hacky, but works lol + // TODO: this sucks CWindow* PWINDOW = nullptr; @@ -1015,11 +1016,11 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) { // manually post event cuz it got ignored above g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", PWINDOW, PWORKSPACE->m_szName.c_str())}); - // this window is gone. Unfocus if needed - if (g_pCompositor->m_pLastWindow == PWINDOW) - g_pCompositor->focusWindow(nullptr); + PWINDOW->m_iWorkspaceID = OLDWORKSPACEIDRETURN; + const auto PNEXTCANDIDATE = g_pLayoutManager->getCurrentLayout()->getNextWindowCandidate(PWINDOW); + PWINDOW->m_iWorkspaceID = workspaceToMoveTo; - g_pInputManager->refocus(); + g_pCompositor->focusWindow(PNEXTCANDIDATE); } void CKeybindManager::moveFocusTo(std::string args) { |
