diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-21 19:18:33 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-21 19:18:33 +0100 |
| commit | 295a0c4a6904b639ae406df2f106eb35d71899ae (patch) | |
| tree | 55ba41ed80f20b798e3f7719323dfb673787a44b /src/Compositor.cpp | |
| parent | 1b50377a5aaa8d5e2585d72dc5393ac6ad6fe248 (diff) | |
Added fullscreen
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 8ee3f3fe..4fe3b91f 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -379,6 +379,15 @@ CWindow* CCompositor::getWindowFromSurface(wlr_surface* pSurface) { return nullptr; } +CWindow* CCompositor::getFullscreenWindowOnWorkspace(const int& ID) { + for (auto& w : m_lWindows) { + if (w.m_iWorkspaceID == ID && w.m_bIsFullscreen) + return &w; + } + + return nullptr; +} + bool CCompositor::isWorkspaceVisible(const int& w) { for (auto& m : m_lMonitors) { if (m.activeWorkspace == w) @@ -426,13 +435,15 @@ CWindow* CCompositor::getFirstWindowOnWorkspace(const int& id) { void CCompositor::fixXWaylandWindowsOnWorkspace(const int& id) { const auto ISVISIBLE = isWorkspaceVisible(id); + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(id); + for (auto& w : m_lWindows) { if (w.m_iWorkspaceID == id) { // moveXWaylandWindow only moves XWayland windows // so there is no need to check here // if the window is XWayland or not. - if (ISVISIBLE) + if (ISVISIBLE && (!PWORKSPACE->hasFullscreenWindow || w.m_bIsFullscreen)) g_pXWaylandManager->moveXWaylandWindow(&w, w.m_vRealPosition); else g_pXWaylandManager->moveXWaylandWindow(&w, Vector2D(42069,42069)); |
