diff options
author | vaxerski <[email protected]> | 2023-01-11 13:40:15 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-01-11 13:40:15 +0100 |
commit | 7afb7c85a74fe3beac634f124cba5a971cb54ca2 (patch) | |
tree | db32c80d47a971ca496f6ec46f15c50f81f0c303 | |
parent | b24f066c4799ac66cc86c0962447c690519df8ef (diff) | |
download | Hyprland-7afb7c85a74fe3beac634f124cba5a971cb54ca2.tar.gz Hyprland-7afb7c85a74fe3beac634f124cba5a971cb54ca2.zip |
handle fullscreen requests on maximized windows
-rw-r--r-- | src/events/Windows.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 50f58cfc..cbee36fc 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -761,7 +761,13 @@ void Events::listener_fullscreenWindow(void* owner, void* data) { if (!PWINDOW->m_bIsX11) { const auto REQUESTED = &PWINDOW->m_uSurface.xdg->toplevel->requested; - if (REQUESTED->fullscreen != PWINDOW->m_bIsFullscreen && !PWINDOW->m_bFakeFullscreenState) + if (REQUESTED->fullscreen && PWINDOW->m_bIsFullscreen) { + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID); + if (PWORKSPACE->m_efFullscreenMode != FULLSCREEN_FULL) { + g_pCompositor->setWindowFullscreen(PWINDOW, false, FULLSCREEN_MAXIMIZED); + g_pCompositor->setWindowFullscreen(PWINDOW, true, FULLSCREEN_FULL); + } + } else if (REQUESTED->fullscreen != PWINDOW->m_bIsFullscreen && !PWINDOW->m_bFakeFullscreenState) g_pCompositor->setWindowFullscreen(PWINDOW, REQUESTED->fullscreen, FULLSCREEN_FULL); requestedFullState = REQUESTED->fullscreen; |