From d96501442fb3bbec129e74e26f379898f15881e2 Mon Sep 17 00:00:00 2001 From: thejch <66577496+thejch@users.noreply.github.com> Date: Sat, 13 Apr 2024 06:39:20 -0700 Subject: core: Fix double special workspace (#5574) * fix double special name * fix special on another monitor * remove extra stuff --- src/Compositor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 4ce4b097..47679169 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1008,7 +1008,10 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { // This is to fix incorrect feedback on the focus history. PWORKSPACE->m_pLastFocusedWindow = pWindow; PWORKSPACE->rememberPrevWorkspace(m_pLastMonitor->activeWorkspace); - PMONITOR->changeWorkspace(PWORKSPACE, false, true); + if (PWORKSPACE->m_bIsSpecialWorkspace) + m_pLastMonitor->changeWorkspace(PWORKSPACE, false, true); // if special ws, open on current monitor + else + PMONITOR->changeWorkspace(PWORKSPACE, false, true); // changeworkspace already calls focusWindow return; } -- cgit v1.2.3