diff options
| author | outfoxxed <outfoxxed@outfoxxed.me> | 2025-07-08 09:56:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-08 18:56:40 +0200 |
| commit | 78e9eddfb6bfbc6b103fc60c9831b23ef252886b (patch) | |
| tree | 4daf06580d89dec717a282c4ec8729285241c8e8 /src/desktop/Popup.cpp | |
| parent | 2f34ef141b0728857d2a6f777c608dfe4c207733 (diff) | |
core: use new typed signals from hu (#10853)
Diffstat (limited to 'src/desktop/Popup.cpp')
| -rw-r--r-- | src/desktop/Popup.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp index b647bed5..702ebdf9 100644 --- a/src/desktop/Popup.cpp +++ b/src/desktop/Popup.cpp @@ -53,24 +53,22 @@ void CPopup::initAllSignals() { if (!m_resource) { if (!m_windowOwner.expired()) - m_listeners.newPopup = - m_windowOwner->m_xdgSurface->m_events.newPopup.registerListener([this](std::any d) { this->onNewPopup(std::any_cast<SP<CXDGPopupResource>>(d)); }); + m_listeners.newPopup = m_windowOwner->m_xdgSurface->m_events.newPopup.listen([this](const auto& resource) { this->onNewPopup(resource); }); else if (!m_layerOwner.expired()) - m_listeners.newPopup = - m_layerOwner->m_layerSurface->m_events.newPopup.registerListener([this](std::any d) { this->onNewPopup(std::any_cast<SP<CXDGPopupResource>>(d)); }); + m_listeners.newPopup = m_layerOwner->m_layerSurface->m_events.newPopup.listen([this](const auto& resource) { this->onNewPopup(resource); }); else ASSERT(false); return; } - m_listeners.reposition = m_resource->m_events.reposition.registerListener([this](std::any d) { this->onReposition(); }); - m_listeners.map = m_resource->m_surface->m_events.map.registerListener([this](std::any d) { this->onMap(); }); - m_listeners.unmap = m_resource->m_surface->m_events.unmap.registerListener([this](std::any d) { this->onUnmap(); }); - m_listeners.dismissed = m_resource->m_events.dismissed.registerListener([this](std::any d) { this->onUnmap(); }); - m_listeners.destroy = m_resource->m_surface->m_events.destroy.registerListener([this](std::any d) { this->onDestroy(); }); - m_listeners.commit = m_resource->m_surface->m_events.commit.registerListener([this](std::any d) { this->onCommit(); }); - m_listeners.newPopup = m_resource->m_surface->m_events.newPopup.registerListener([this](std::any d) { this->onNewPopup(std::any_cast<SP<CXDGPopupResource>>(d)); }); + m_listeners.reposition = m_resource->m_events.reposition.listen([this] { this->onReposition(); }); + m_listeners.map = m_resource->m_surface->m_events.map.listen([this] { this->onMap(); }); + m_listeners.unmap = m_resource->m_surface->m_events.unmap.listen([this] { this->onUnmap(); }); + m_listeners.dismissed = m_resource->m_events.dismissed.listen([this] { this->onUnmap(); }); + m_listeners.destroy = m_resource->m_surface->m_events.destroy.listen([this] { this->onDestroy(); }); + m_listeners.commit = m_resource->m_surface->m_events.commit.listen([this] { this->onCommit(); }); + m_listeners.newPopup = m_resource->m_surface->m_events.newPopup.listen([this](const auto& resource) { this->onNewPopup(resource); }); } void CPopup::onNewPopup(SP<CXDGPopupResource> popup) { |
