From 347b83903474ab9e95fa9d4ba123f6f78ab38d40 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 3 Apr 2024 10:09:42 +0100 Subject: workspaces: add visible flag --- src/desktop/Popup.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/desktop/Popup.cpp') diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp index 77e486fd..a32b28d6 100644 --- a/src/desktop/Popup.cpp +++ b/src/desktop/Popup.cpp @@ -1,4 +1,5 @@ #include "Popup.hpp" +#include "../config/ConfigValue.hpp" #include "../Compositor.hpp" CPopup::CPopup(CWindow* pOwner) : m_pWindowOwner(pOwner) { @@ -145,6 +146,15 @@ void CPopup::onCommit(bool ignoreSiblings) { return; } + if (m_pWindowOwner && (!m_pWindowOwner->m_bIsMapped || !m_pWindowOwner->m_pWorkspace->m_bVisible)) { + m_vLastSize = {m_pWLR->base->current.geometry.width, m_pWLR->base->current.geometry.height}; + + static auto PLOGDAMAGE = CConfigValue("debug:log_damage"); + if (*PLOGDAMAGE) + Debug::log(LOG, "Refusing to commit damage from a subsurface of {} because it's invisible.", m_pWindowOwner); + return; + } + const auto COORDS = coordsGlobal(); const auto COORDSLOCAL = coordsRelativeToParent(); -- cgit v1.2.3