diff options
| author | dranull <150595692+dranull@users.noreply.github.com> | 2023-12-03 12:53:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-03 12:53:12 +0000 |
| commit | 59cb0e20def602c0fe928c40f8398daa7ea1427d (patch) | |
| tree | 54a0141b60c4494f313e29c5829e7b357c68935c /src/Compositor.cpp | |
| parent | 80b9b21f9f24b6e8db2fc6f7705cd124f436ffba (diff) | |
input: Handle fullscreen windows in vectorToWindowIdeal (#4021)
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index a842bb6b..a12fabf1 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -701,26 +701,29 @@ CWindow* CCompositor::vectorToWindowIdeal(const Vector2D& pos, CWindow* pIgnoreW } } + const int64_t WORKSPACEID = special ? PMONITOR->specialWorkspaceID : PMONITOR->activeWorkspace; + const auto PWORKSPACE = getWorkspaceByID(WORKSPACEID); + + if (PWORKSPACE->m_bHasFullscreenWindow) + return getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID); + // for windows, we need to check their extensions too, first. for (auto& w : m_vWindows) { if (special != isWorkspaceSpecial(w->m_iWorkspaceID)) continue; - const int64_t WORKSPACEID = special ? PMONITOR->specialWorkspaceID : PMONITOR->activeWorkspace; - if (!w->m_bIsX11 && !w->m_bIsFloating && w->m_bIsMapped && w->m_iWorkspaceID == WORKSPACEID && !w->isHidden() && !w->m_bX11ShouldntFocus && !w->m_bNoFocus && w.get() != pIgnoreWindow) { - if ((w)->hasPopupAt(pos)) + if (w->hasPopupAt(pos)) return w.get(); } } + for (auto& w : m_vWindows) { if (special != isWorkspaceSpecial(w->m_iWorkspaceID)) continue; - const int64_t WORKSPACEID = special ? PMONITOR->specialWorkspaceID : PMONITOR->activeWorkspace; - - CBox box = {w->m_vPosition.x, w->m_vPosition.y, w->m_vSize.x, w->m_vSize.y}; + CBox box = {w->m_vPosition, w->m_vSize}; if (!w->m_bIsFloating && w->m_bIsMapped && box.containsPoint(pos) && w->m_iWorkspaceID == WORKSPACEID && !w->isHidden() && !w->m_bX11ShouldntFocus && !w->m_bNoFocus && w.get() != pIgnoreWindow) return w.get(); |
