From 78e9eddfb6bfbc6b103fc60c9831b23ef252886b Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Tue, 8 Jul 2025 09:56:40 -0700 Subject: core: use new typed signals from hu (#10853) --- src/desktop/Popup.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/desktop/Popup.cpp') 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>(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>(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>(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 popup) { -- cgit v1.2.3