internal: move workspace special check higher in changeWorkspace

This commit is contained in:
vaxerski 2023-04-17 13:32:35 +01:00
parent 785fc8d669
commit 7c36a3e167

View file

@ -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;