mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 15:11:57 -07:00
Added fullscreen rule
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user