diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-09-01 11:47:48 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-09-01 11:47:48 +0200 |
| commit | 8581e7178961ebe3a6c25f49583d13f9ee6ee22a (patch) | |
| tree | b98bb294baffae86c8031cd83a94cc465bdca355 /src/managers/KeybindManager.cpp | |
| parent | bb90ff04610023457633cf76454a39727395b3a9 (diff) | |
optimize calls in toggleSpecialWorkspace
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 4429d28b..ec0c9516 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1242,7 +1242,7 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) { } } - if (const auto PWINDOW = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace)->getLastFocusedWindow(); g_pCompositor->windowValidMapped(PWINDOW)) + if (const auto PWINDOW = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace)->getLastFocusedWindow(); 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->getLastFocusedWindow(); g_pCompositor->windowValidMapped(PWINDOW)) + if (const auto PWINDOW = PSPECIALWORKSPACE->getLastFocusedWindow(); PWINDOW) g_pCompositor->focusWindow(PWINDOW); else g_pInputManager->refocus(); |
