mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 13:45:58 +01:00
per window state instead of global
This commit is contained in:
parent
e51b201316
commit
a351dd7b55
3 changed files with 11 additions and 9 deletions
|
@ -2353,16 +2353,16 @@ void CCompositor::setWindowFullscreenState(const PHLWINDOW PWINDOW, sFullscreenS
|
||||||
const eFullscreenMode CURRENT_EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)PWINDOW->m_sFullscreenState.internal);
|
const eFullscreenMode CURRENT_EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)PWINDOW->m_sFullscreenState.internal);
|
||||||
const eFullscreenMode EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)state.internal);
|
const eFullscreenMode EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)state.internal);
|
||||||
|
|
||||||
if (*PALLOWPINFULLSCREEN && !m_bPinFullscreened && PWINDOW->m_bPinned && !PWINDOW->isFullscreen()) {
|
if (*PALLOWPINFULLSCREEN && !PWINDOW->m_bPinFullscreened && PWINDOW->m_bPinned && !PWINDOW->isFullscreen()) {
|
||||||
PWINDOW->m_bPinned = false;
|
PWINDOW->m_bPinned = false;
|
||||||
m_bPinFullscreened = true;
|
PWINDOW->m_bPinFullscreened = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool CHANGEINTERNAL = !(PWINDOW->m_bPinned || CURRENT_EFFECTIVE_MODE == EFFECTIVE_MODE || (PWORKSPACE->m_bHasFullscreenWindow && !PWINDOW->isFullscreen()));
|
const bool CHANGEINTERNAL = !(PWINDOW->m_bPinned || CURRENT_EFFECTIVE_MODE == EFFECTIVE_MODE || (PWORKSPACE->m_bHasFullscreenWindow && !PWINDOW->isFullscreen()));
|
||||||
|
|
||||||
if (*PALLOWPINFULLSCREEN && m_bPinFullscreened && !PWINDOW->m_bPinned && PWINDOW->isFullscreen()) {
|
if (*PALLOWPINFULLSCREEN && PWINDOW->m_bPinFullscreened && !PWINDOW->m_bPinned && PWINDOW->isFullscreen()) {
|
||||||
PWINDOW->m_bPinned = true;
|
PWINDOW->m_bPinned = true;
|
||||||
m_bPinFullscreened = false;
|
PWINDOW->m_bPinFullscreened = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: update the state on syncFullscreen changes
|
// TODO: update the state on syncFullscreen changes
|
||||||
|
|
|
@ -94,7 +94,6 @@ class CCompositor {
|
||||||
bool m_bFinalRequests = false;
|
bool m_bFinalRequests = false;
|
||||||
bool m_bDesktopEnvSet = false;
|
bool m_bDesktopEnvSet = false;
|
||||||
bool m_bEnableXwayland = true;
|
bool m_bEnableXwayland = true;
|
||||||
bool m_bPinFullscreened = false;
|
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
// ------------------------------------------------- //
|
||||||
|
|
||||||
|
|
|
@ -332,6 +332,9 @@ class CWindow {
|
||||||
// For pinned (sticky) windows
|
// For pinned (sticky) windows
|
||||||
bool m_bPinned = false;
|
bool m_bPinned = false;
|
||||||
|
|
||||||
|
// For preserving pinned state when fullscreening a pinned window
|
||||||
|
bool m_bPinFullscreened = false;
|
||||||
|
|
||||||
// urgency hint
|
// urgency hint
|
||||||
bool m_bIsUrgent = false;
|
bool m_bIsUrgent = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue