From 78bf88ba607d0efff0e270bc16562e2081a34037 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 26 Jun 2022 12:12:29 +0200 Subject: Added fullscreen rule --- src/Compositor.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 5fb75f36..a3fd3b93 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1115,4 +1115,18 @@ bool CCompositor::workspaceIDOutOfBounds(const int& id) { } return std::clamp(id, lowestID, highestID) != id; +} + +void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode mode) { + if (!windowValidMapped(pWindow)) + return; + + g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(pWindow, mode, on); + + g_pXWaylandManager->setWindowFullscreen(pWindow, pWindow->m_bIsFullscreen && mode == FULLSCREEN_FULL); + // make all windows on the same workspace under the fullscreen window + for (auto& w : g_pCompositor->m_lWindows) { + if (w.m_iWorkspaceID == pWindow->m_iWorkspaceID) + w.m_bCreatedOverFullscreen = false; + } } \ No newline at end of file -- cgit v1.2.3