compositor: Fix a lack of a check for workspace equality on same monitors in getInDirection (#3625)

* prevent movefocus and movewindow from going into main workspace when in special workspace

* compare workspace IDs instead

* change comparison and make code more readable
This commit is contained in:
thejch 2023-10-20 02:53:37 -07:00 committed by GitHub
parent 386708563c
commit bb9d0aed5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1482,6 +1482,9 @@ CWindow* CCompositor::getWindowInDirection(CWindow* pWindow, char dir) {
if (w.get() == pWindow || !w->m_bIsMapped || w->isHidden() || w->m_bIsFloating || !isWorkspaceVisible(w->m_iWorkspaceID))
continue;
if (pWindow->m_iMonitorID == w->m_iMonitorID && pWindow->m_iWorkspaceID != w->m_iWorkspaceID)
continue;
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(w->m_iWorkspaceID);
if (PWORKSPACE->m_bHasFullscreenWindow && !w->m_bIsFullscreen && !w->m_bCreatedOverFullscreen)
continue;