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;