summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-17 13:32:35 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-17 13:32:35 +0100
commit7c36a3e1670e369d84c4f61b9de300ef72710c14 (patch)
treec87fe5e1f7bad939919a625f6238976c30e06af5 /src/helpers/Monitor.cpp
parent785fc8d669b35d277cf1c58012ba7f3f406ed9ee (diff)
internal: move workspace special check higher in changeWorkspace
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r--src/helpers/Monitor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index 44d566cb..98e83fc6 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;