From 563fe83db269bb19e796cf6b21d3e1bcbf1b41f1 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 1 Sep 2023 22:57:23 +0200 Subject: [PATCH] keybinds: set special monitor id before recalc set special workspace's monitor ID before we call recalculateMonitor in toggleSpecialWorkspace. Fixes #1151 --- src/managers/KeybindManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 7ce52887..bbf1ca27 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -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);