From 7c36a3e1670e369d84c4f61b9de300ef72710c14 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 17 Apr 2023 13:32:35 +0100 Subject: [PATCH] internal: move workspace special check higher in changeWorkspace --- src/helpers/Monitor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 44d566cb6..98e83fc68 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -492,6 +492,11 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal) { if (!pWorkspace) return; + if (pWorkspace->m_bIsSpecialWorkspace) { + Debug::log(ERR, "BUG THIS: Attempted to changeWorkspace to special!"); + return; + } + if (pWorkspace->m_iID == activeWorkspace) { // in some cases (e.g. workspace from one monitor to another) // we need to send this @@ -500,11 +505,6 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal) { return; } - if (pWorkspace->m_bIsSpecialWorkspace) { - Debug::log(ERR, "BUG THIS: Attempted to changeWorkspace to special!"); - return; - } - const auto POLDWORKSPACE = g_pCompositor->getWorkspaceByID(activeWorkspace); activeWorkspace = pWorkspace->m_iID;