From 28867758c486b12ebe387d72bba2be67a7dc8a2a Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 14 Aug 2022 16:39:56 +0200 Subject: [PATCH] better fix the last fix --- src/Compositor.cpp | 4 +--- src/layout/DwindleLayout.cpp | 3 +++ src/layout/MasterLayout.cpp | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 25405666..6ddd7f90 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1411,9 +1411,7 @@ void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode if (!windowValidMapped(pWindow)) return; - if (!isWorkspaceVisible(pWindow->m_iWorkspaceID)) { - g_pKeybindManager->changeworkspace("[internal]" + std::to_string(pWindow->m_iWorkspaceID)); - } + focusWindow(pWindow); g_pLayoutManager->getCurrentLayout()->fullscreenRequestForWindow(pWindow, mode, on); diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 192fe7c2..15388bf3 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -628,6 +628,9 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree if (!g_pCompositor->windowValidMapped(pWindow)) return; + if (!g_pCompositor->isWorkspaceVisible(pWindow->m_iWorkspaceID)) + return; + if (on == pWindow->m_bIsFullscreen) return; // ignore diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index 1f647c63..71c65125 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -320,6 +320,9 @@ void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreen if (!g_pCompositor->windowValidMapped(pWindow)) return; + if (!g_pCompositor->isWorkspaceVisible(pWindow->m_iWorkspaceID)) + return; + if (on == pWindow->m_bIsFullscreen) return; // ignore