diff options
| author | thejch <66577496+thejch@users.noreply.github.com> | 2023-10-20 02:53:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-20 10:53:37 +0100 |
| commit | bb9d0aed5bd11879f5a532e26fc0a91d1a8af714 (patch) | |
| tree | 6587a9f2f125155d96085b0ae0e2e5fe1a6f816d | |
| parent | 386708563c3d9d85ffd60b4eeb6c767d29f948db (diff) | |
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
| -rw-r--r-- | src/Compositor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index f02f7c66..704ac64a 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -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; |
