Added fullscreen rule

This commit is contained in:
vaxerski
2022-06-26 12:12:29 +02:00
parent 29aab21033
commit 78bf88ba60
8 changed files with 35 additions and 16 deletions

View File

@@ -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;
}
}