keybinds: set special monitor id before recalc

set special workspace's monitor ID before we call recalculateMonitor in toggleSpecialWorkspace. Fixes #1151
This commit is contained in:
vaxerski 2023-09-01 22:57:23 +02:00
parent f242f9447b
commit 563fe83db2

View File

@ -1538,9 +1538,9 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
POLDMON->specialWorkspaceID = 0;
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(POLDMON->ID);
PMONITOR->specialWorkspaceID = workspaceID;
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID);
PMONITOR->specialWorkspaceID = workspaceID;
PSPECIALWORKSPACE->m_iMonitorID = PMONITOR->ID;
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITOR->ID);
if (const auto PWINDOW = PSPECIALWORKSPACE->getLastFocusedWindow(); PWINDOW)
g_pCompositor->focusWindow(PWINDOW);