mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 11:46:01 +01:00
fix: maxiumize(fullscreenstate 1) to fullscreen or vice versa won't make it be pinned
remove: second var to remember maxiumize, use the same var
This commit is contained in:
parent
22024dc0d6
commit
7b31616a8e
2 changed files with 2 additions and 16 deletions
|
@ -2354,29 +2354,18 @@ void CCompositor::setWindowFullscreenState(const PHLWINDOW PWINDOW, sFullscreenS
|
|||
const eFullscreenMode EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)state.internal);
|
||||
|
||||
if (*PALLOWPINFULLSCREEN) {
|
||||
if (!PWINDOW->m_bPinFullscreened && PWINDOW->m_sFullscreenState.internal != FSMODE_FULLSCREEN) {
|
||||
if (!PWINDOW->m_bPinFullscreened && !PWINDOW->isFullscreen() && PWINDOW->m_bPinned) {
|
||||
PWINDOW->m_bPinned = false;
|
||||
PWINDOW->m_bPinFullscreened = true;
|
||||
} else if (!PWINDOW->m_bPinMaximized && PWINDOW->m_sFullscreenState.internal != FSMODE_MAXIMIZED) {
|
||||
PWINDOW->m_bPinned = false;
|
||||
PWINDOW->m_bPinMaximized = true;
|
||||
}
|
||||
}
|
||||
|
||||
const bool CHANGEINTERNAL = !(PWINDOW->m_bPinned || CURRENT_EFFECTIVE_MODE == EFFECTIVE_MODE || (PWORKSPACE->m_bHasFullscreenWindow && !PWINDOW->isFullscreen()));
|
||||
|
||||
if (*PALLOWPINFULLSCREEN && PWINDOW->m_bPinFullscreened && !PWINDOW->m_bPinned && PWINDOW->m_sFullscreenState.internal == FSMODE_FULLSCREEN) {
|
||||
PWINDOW->m_bPinned = true;
|
||||
PWINDOW->m_bPinFullscreened = false;
|
||||
}
|
||||
|
||||
if (*PALLOWPINFULLSCREEN) {
|
||||
if (PWINDOW->m_bPinFullscreened && PWINDOW->m_sFullscreenState.internal == FSMODE_FULLSCREEN) {
|
||||
if (PWINDOW->m_bPinFullscreened && PWINDOW->isFullscreen() && !PWINDOW->m_bPinned && state.internal == FSMODE_NONE) {
|
||||
PWINDOW->m_bPinned = true;
|
||||
PWINDOW->m_bPinFullscreened = false;
|
||||
} else if (PWINDOW->m_bPinMaximized && PWINDOW->m_sFullscreenState.internal == FSMODE_MAXIMIZED) {
|
||||
PWINDOW->m_bPinned = true;
|
||||
PWINDOW->m_bPinMaximized = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -335,9 +335,6 @@ class CWindow {
|
|||
// For preserving pinned state when fullscreening a pinned window
|
||||
bool m_bPinFullscreened = false;
|
||||
|
||||
// For preserving pinned state when maximizing a pinned window
|
||||
bool m_bPinMaximized = false;
|
||||
|
||||
// urgency hint
|
||||
bool m_bIsUrgent = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue