diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-02-01 19:10:19 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-02-01 19:10:19 +0000 |
| commit | 64fefa3749868e6170b6275963c6528456a7d9f2 (patch) | |
| tree | f4f4c7e8e2b586b3d009ca36adc1d1c7b2d6364d /src/desktop/Popup.cpp | |
| parent | e380b6ed66aceeae8fde84b4baed0d91550e9f4c (diff) | |
desktop: move popups to UPs and fix missing subsurface resource
fixes #9283
Diffstat (limited to 'src/desktop/Popup.cpp')
| -rw-r--r-- | src/desktop/Popup.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp index e66cebcd..4accb58f 100644 --- a/src/desktop/Popup.cpp +++ b/src/desktop/Popup.cpp @@ -12,24 +12,24 @@ #include "../render/OpenGL.hpp" #include <ranges> -SP<CPopup> CPopup::create(PHLWINDOW pOwner) { - auto popup = SP<CPopup>(new CPopup()); +UP<CPopup> CPopup::create(PHLWINDOW pOwner) { + auto popup = UP<CPopup>(new CPopup()); popup->m_pWindowOwner = pOwner; popup->m_pSelf = popup; popup->initAllSignals(); return popup; } -SP<CPopup> CPopup::create(PHLLS pOwner) { - auto popup = SP<CPopup>(new CPopup()); +UP<CPopup> CPopup::create(PHLLS pOwner) { + auto popup = UP<CPopup>(new CPopup()); popup->m_pLayerOwner = pOwner; popup->m_pSelf = popup; popup->initAllSignals(); return popup; } -SP<CPopup> CPopup::create(SP<CXDGPopupResource> resource, WP<CPopup> pOwner) { - auto popup = SP<CPopup>(new CPopup()); +UP<CPopup> CPopup::create(SP<CXDGPopupResource> resource, WP<CPopup> pOwner) { + auto popup = UP<CPopup>(new CPopup()); popup->m_pResource = resource; popup->m_pWindowOwner = pOwner->m_pWindowOwner; popup->m_pLayerOwner = pOwner->m_pLayerOwner; @@ -282,7 +282,8 @@ void CPopup::recheckTree() { } void CPopup::recheckChildrenRecursive() { - auto cpy = m_vChildren; + std::vector<WP<CPopup>> cpy; + std::ranges::for_each(m_vChildren, [&cpy](const auto& el) { cpy.emplace_back(el); }); for (auto const& c : cpy) { c->onCommit(true); c->recheckChildrenRecursive(); |
