diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-03 10:09:42 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-03 10:09:48 +0100 |
| commit | 347b83903474ab9e95fa9d4ba123f6f78ab38d40 (patch) | |
| tree | cc5a355120ed3a07c85af428c91b63e10674dff8 /src/desktop/Popup.cpp | |
| parent | fbdaf74a82b38e11a0a6914b3c9f7cb934ac1624 (diff) | |
workspaces: add visible flag
Diffstat (limited to 'src/desktop/Popup.cpp')
| -rw-r--r-- | src/desktop/Popup.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<Hyprlang::INT>("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(); |
