mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 07:05:58 +01:00
optimize calls in toggleSpecialWorkspace
This commit is contained in:
parent
bb90ff0461
commit
8581e71789
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue