diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-09-01 11:46:36 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-09-01 11:46:41 +0200 |
| commit | bb90ff04610023457633cf76454a39727395b3a9 (patch) | |
| tree | 3614173a6b3777c4d663f0306771970169fd39a1 /src/managers/KeybindManager.cpp | |
| parent | 1d4d2f4793e3f44a2cee0983ba3008025a40313d (diff) | |
sanity check on last window
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index fb70eb11..4429d28b 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -652,7 +652,7 @@ void CKeybindManager::changeworkspace(std::string args) { Debug::log(LOG, "Changed to workspace %i", workspaceToChangeTo); // focus - if (const auto PWINDOW = PWORKSPACETOCHANGETO->m_pLastFocusedWindow; g_pCompositor->windowValidMapped(PWINDOW)) { + if (const auto PWINDOW = PWORKSPACETOCHANGETO->getLastFocusedWindow(); PWINDOW) { // warp and focus if (anotherMonitor) g_pCompositor->warpCursorTo(PWINDOW->m_vRealPosition.vec() + PWINDOW->m_vRealSize.vec() / 2.f); @@ -1242,7 +1242,7 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) { } } - if (const auto PWINDOW = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace)->m_pLastFocusedWindow; g_pCompositor->windowValidMapped(PWINDOW) && PWINDOW->m_iMonitorID == monID) + if (const auto PWINDOW = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace)->getLastFocusedWindow(); g_pCompositor->windowValidMapped(PWINDOW)) g_pCompositor->focusWindow(PWINDOW); else g_pInputManager->refocus(); @@ -1260,7 +1260,7 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) { PSPECIALWORKSPACE->startAnim(true, true); PSPECIALWORKSPACE->m_iMonitorID = g_pCompositor->m_pLastMonitor->ID; - if (const auto PWINDOW = PSPECIALWORKSPACE->m_pLastFocusedWindow; g_pCompositor->windowValidMapped(PWINDOW)) + if (const auto PWINDOW = PSPECIALWORKSPACE->getLastFocusedWindow(); g_pCompositor->windowValidMapped(PWINDOW)) g_pCompositor->focusWindow(PWINDOW); else g_pInputManager->refocus(); |
