aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-01-11 13:40:15 +0100
committervaxerski <[email protected]>2023-01-11 13:40:15 +0100
commit7afb7c85a74fe3beac634f124cba5a971cb54ca2 (patch)
treedb32c80d47a971ca496f6ec46f15c50f81f0c303
parentb24f066c4799ac66cc86c0962447c690519df8ef (diff)
downloadHyprland-7afb7c85a74fe3beac634f124cba5a971cb54ca2.tar.gz
Hyprland-7afb7c85a74fe3beac634f124cba5a971cb54ca2.zip
handle fullscreen requests on maximized windows
-rw-r--r--src/events/Windows.cpp8
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;