summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-26 12:12:29 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-26 12:12:29 +0200
commit78bf88ba607d0efff0e270bc16562e2081a34037 (patch)
treed7e82a710fbdbf05ab780f73ef8f39d7494023d3 /src/Compositor.cpp
parent29aab210333d69fb94cf8ec4a0f60582bc336721 (diff)
Added fullscreen rule
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp14
1 files changed, 14 insertions, 0 deletions
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