diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-10 21:45:24 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-10 21:45:24 +0200 |
| commit | 0f9850fafcb2006e4bf943a65d79b99567a3be4f (patch) | |
| tree | 72a9de37d6ee4704e1e6b105b3cfb62635ae91eb /src/managers/KeybindManager.cpp | |
| parent | 8a4f6d01f3ac3016403924064567791371c83f88 (diff) | |
moveactive fixes
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index b79d8c3a..d0fcfd83 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -237,11 +237,20 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) { // Hack: So that the layout doesnt find our window at the cursor PWINDOW->m_vPosition = Vector2D(-42069, -42069); + + // Save the real position and size because the layout might set its own + const auto PSAVEDSIZE = PWINDOW->m_vRealSize; + const auto PSAVEDPOS = PWINDOW->m_vRealPosition; g_pLayoutManager->getCurrentLayout()->onWindowCreated(PWINDOW); + // and restore it + PWINDOW->m_vRealPosition = PSAVEDPOS; + PWINDOW->m_vRealSize = PSAVEDSIZE; if (PWINDOW->m_bIsFloating) { PWINDOW->m_vRealPosition = PWINDOW->m_vRealPosition - g_pCompositor->getMonitorFromID(OLDWORKSPACE->monitorID)->vecPosition; PWINDOW->m_vRealPosition = PWINDOW->m_vRealPosition + g_pCompositor->getMonitorFromID(NEWWORKSPACE->monitorID)->vecPosition; + PWINDOW->m_vEffectivePosition = PWINDOW->m_vRealPosition; + PWINDOW->m_vPosition = PWINDOW->m_vRealPosition; } } |
