mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 04:25:59 +01:00
internal: fix interactions with fakefullscreen (#4113)
- In a maximized window, unstuck fakefullscreen from on state - In a fakefullscreen window, going in and out of fullscreen state keep the fakefullscreen state rendered
This commit is contained in:
parent
8191e635a3
commit
e53134ca90
4 changed files with 8 additions and 3 deletions
|
@ -2257,7 +2257,7 @@ void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode
|
||||||
|
|
||||||
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(pWindow, MODE, on);
|
g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(pWindow, MODE, on);
|
||||||
|
|
||||||
g_pXWaylandManager->setWindowFullscreen(pWindow, pWindow->m_bIsFullscreen && MODE == FULLSCREEN_FULL);
|
g_pXWaylandManager->setWindowFullscreen(pWindow, pWindow->shouldSendFullscreenState());
|
||||||
|
|
||||||
pWindow->updateDynamicRules();
|
pWindow->updateDynamicRules();
|
||||||
updateWindowAnimatedDecorationValues(pWindow);
|
updateWindowAnimatedDecorationValues(pWindow);
|
||||||
|
|
|
@ -1000,3 +1000,8 @@ int CWindow::getRealBorderSize() {
|
||||||
bool CWindow::canBeTorn() {
|
bool CWindow::canBeTorn() {
|
||||||
return (m_sAdditionalConfigData.forceTearing.toUnderlying() || m_bTearingHint) && g_pHyprRenderer->m_bTearingEnvSatisfied;
|
return (m_sAdditionalConfigData.forceTearing.toUnderlying() || m_bTearingHint) && g_pHyprRenderer->m_bTearingEnvSatisfied;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CWindow::shouldSendFullscreenState() {
|
||||||
|
const auto MODE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID)->m_efFullscreenMode;
|
||||||
|
return m_bFakeFullscreenState || (m_bIsFullscreen && (MODE == FULLSCREEN_FULL));
|
||||||
|
}
|
||||||
|
|
|
@ -366,6 +366,7 @@ class CWindow {
|
||||||
bool opaque();
|
bool opaque();
|
||||||
float rounding();
|
float rounding();
|
||||||
bool canBeTorn();
|
bool canBeTorn();
|
||||||
|
bool shouldSendFullscreenState();
|
||||||
|
|
||||||
int getRealBorderSize();
|
int getRealBorderSize();
|
||||||
void updateSpecialRenderData();
|
void updateSpecialRenderData();
|
||||||
|
|
|
@ -1918,8 +1918,7 @@ void CKeybindManager::fakeFullscreenActive(std::string args) {
|
||||||
if (g_pCompositor->m_pLastWindow) {
|
if (g_pCompositor->m_pLastWindow) {
|
||||||
// will also set the flag
|
// will also set the flag
|
||||||
g_pCompositor->m_pLastWindow->m_bFakeFullscreenState = !g_pCompositor->m_pLastWindow->m_bFakeFullscreenState;
|
g_pCompositor->m_pLastWindow->m_bFakeFullscreenState = !g_pCompositor->m_pLastWindow->m_bFakeFullscreenState;
|
||||||
g_pXWaylandManager->setWindowFullscreen(g_pCompositor->m_pLastWindow,
|
g_pXWaylandManager->setWindowFullscreen(g_pCompositor->m_pLastWindow, g_pCompositor->m_pLastWindow->shouldSendFullscreenState());
|
||||||
g_pCompositor->m_pLastWindow->m_bFakeFullscreenState || g_pCompositor->m_pLastWindow->m_bIsFullscreen);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue