From d0ec2b72aec8a91a904b7678ab093e648bd59cf2 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:22:21 +0200 Subject: [PATCH] report sizes to all windows on fullscreen --- src/Compositor.cpp | 10 ++++++++++ src/Compositor.hpp | 1 + 2 files changed, 11 insertions(+) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 5efbea2c..c9bd3aad 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1405,6 +1405,8 @@ void CCompositor::setWindowFullscreen(CWindow* pWindow, bool on, eFullscreenMode } g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize.goalv(), true); + + forceReportSizesToWindowsOnWorkspace(pWindow->m_iWorkspaceID); } void CCompositor::moveUnmanagedX11ToWindows(CWindow* pWindow) { @@ -1604,4 +1606,12 @@ Vector2D CCompositor::parseWindowVectorArgsRelative(const std::string& args, con const int Y = std::stoi(y); return Vector2D(X + relativeTo.x, Y + relativeTo.y); +} + +void CCompositor::forceReportSizesToWindowsOnWorkspace(const int& wid) { + for (auto& w : m_vWindows) { + if (w->m_iWorkspaceID == wid && w->m_bIsMapped && !w->m_bHidden) { + g_pXWaylandManager->setWindowSize(w.get(), w->m_vRealSize.vec(), true); + } + } } \ No newline at end of file diff --git a/src/Compositor.hpp b/src/Compositor.hpp index 6ab5165f..082e4601 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -158,6 +158,7 @@ public: SLayerSurface* getLayerSurfaceFromSurface(wlr_surface*); void closeWindow(CWindow*); Vector2D parseWindowVectorArgsRelative(const std::string&, const Vector2D&); + void forceReportSizesToWindowsOnWorkspace(const int&); std::string explicitConfigPath;