oopsie daisy

This commit is contained in:
Vaxry 2024-07-20 00:36:45 +02:00
parent 85cf0972bf
commit 70e4670185
2 changed files with 5 additions and 4 deletions

View File

@ -55,7 +55,7 @@ void CPopup::initAllSignals() {
} }
void CPopup::onNewPopup(SP<CXDGPopupResource> popup) { void CPopup::onNewPopup(SP<CXDGPopupResource> popup) {
const auto POPUP = m_vChildren.emplace_back(std::make_unique<CPopup>(popup, this)).get(); const auto POPUP = m_vChildren.emplace_back(makeShared<CPopup>(popup, this)).get();
Debug::log(LOG, "New popup at {:x}", (uintptr_t)POPUP); Debug::log(LOG, "New popup at {:x}", (uintptr_t)POPUP);
} }
@ -250,7 +250,8 @@ void CPopup::recheckTree() {
} }
void CPopup::recheckChildrenRecursive() { void CPopup::recheckChildrenRecursive() {
for (auto& c : m_vChildren) { auto cpy = m_vChildren;
for (auto& c : cpy) {
c->onCommit(true); c->onCommit(true);
c->recheckChildrenRecursive(); c->recheckChildrenRecursive();
} }

View File

@ -60,8 +60,8 @@ class CPopup {
bool m_bMapped = false; bool m_bMapped = false;
// //
std::vector<std::unique_ptr<CPopup>> m_vChildren; std::vector<SP<CPopup>> m_vChildren;
std::unique_ptr<CSubsurface> m_pSubsurfaceHead; std::unique_ptr<CSubsurface> m_pSubsurfaceHead;
struct { struct {
CHyprSignalListener newPopup; CHyprSignalListener newPopup;