From 4443906994d09993e9bf6c70bed1a03261831973 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 27 Jun 2022 20:11:09 +0200 Subject: [PATCH] fix fullscreen rule on already fullscreen ws --- src/events/Windows.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 94a4662b..15f7a5ce 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -260,6 +260,13 @@ void Events::listener_mapWindow(void* owner, void* data) { } if (requestsFullscreen) { + // fix fullscreen on requested (basically do a switcheroo) + if (PWORKSPACE->m_bHasFullscreenWindow) { + const auto PFULLWINDOW = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID); + g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(PFULLWINDOW, FULLSCREEN_FULL, false); + g_pXWaylandManager->setWindowFullscreen(PFULLWINDOW, PFULLWINDOW->m_bIsFullscreen); + } + g_pCompositor->setWindowFullscreen(PWINDOW, true, FULLSCREEN_FULL); }