summaryrefslogtreecommitdiff
path: root/src/xwayland/XWM.cpp
diff options
context:
space:
mode:
authoroutfoxxed <outfoxxed@outfoxxed.me>2025-07-08 09:56:40 -0700
committerGitHub <noreply@github.com>2025-07-08 18:56:40 +0200
commit78e9eddfb6bfbc6b103fc60c9831b23ef252886b (patch)
tree4daf06580d89dec717a282c4ec8729285241c8e8 /src/xwayland/XWM.cpp
parent2f34ef141b0728857d2a6f777c608dfe4c207733 (diff)
core: use new typed signals from hu (#10853)
Diffstat (limited to 'src/xwayland/XWM.cpp')
-rw-r--r--src/xwayland/XWM.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/xwayland/XWM.cpp b/src/xwayland/XWM.cpp
index 2854647d..a2461bb2 100644
--- a/src/xwayland/XWM.cpp
+++ b/src/xwayland/XWM.cpp
@@ -984,9 +984,8 @@ CXWM::CXWM() : m_connection(makeUnique<CXCBConnection>(g_pXWayland->m_server->m_
setActiveWindow(XCB_WINDOW_NONE);
initSelection();
- m_listeners.newWLSurface = PROTO::compositor->m_events.newSurface.registerListener([this](std::any d) { onNewSurface(std::any_cast<SP<CWLSurfaceResource>>(d)); });
- m_listeners.newXShellSurface =
- PROTO::xwaylandShell->m_events.newSurface.registerListener([this](std::any d) { onNewResource(std::any_cast<SP<CXWaylandSurfaceResource>>(d)); });
+ m_listeners.newWLSurface = PROTO::compositor->m_events.newSurface.listen([this](const auto& surface) { onNewSurface(surface); });
+ m_listeners.newXShellSurface = PROTO::xwaylandShell->m_events.newSurface.listen([this](const auto& surface) { onNewResource(surface); });
createWMWindow();
@@ -1218,12 +1217,12 @@ void CXWM::initSelection() {
createSelectionWindow(m_clipboard.window, "CLIPBOARD_MANAGER");
createSelectionWindow(m_clipboard.window, "CLIPBOARD");
- m_clipboard.listeners.setSelection = g_pSeatManager->m_events.setSelection.registerListener([this](std::any) { m_clipboard.onSelection(); });
- m_clipboard.listeners.keyboardFocusChange = g_pSeatManager->m_events.keyboardFocusChange.registerListener([this](std::any) { m_clipboard.onKeyboardFocus(); });
+ m_clipboard.listeners.setSelection = g_pSeatManager->m_events.setSelection.listen([this] { m_clipboard.onSelection(); });
+ m_clipboard.listeners.keyboardFocusChange = g_pSeatManager->m_events.keyboardFocusChange.listen([this] { m_clipboard.onKeyboardFocus(); });
createSelectionWindow(m_primarySelection.window, "PRIMARY");
- m_primarySelection.listeners.setSelection = g_pSeatManager->m_events.setPrimarySelection.registerListener([this](std::any) { m_primarySelection.onSelection(); });
- m_primarySelection.listeners.keyboardFocusChange = g_pSeatManager->m_events.keyboardFocusChange.registerListener([this](std::any) { m_primarySelection.onKeyboardFocus(); });
+ m_primarySelection.listeners.setSelection = g_pSeatManager->m_events.setPrimarySelection.listen([this] { m_primarySelection.onSelection(); });
+ m_primarySelection.listeners.keyboardFocusChange = g_pSeatManager->m_events.keyboardFocusChange.listen([this] { m_primarySelection.onKeyboardFocus(); });
createSelectionWindow(m_dndSelection.window, "XdndAware", true);
const uint32_t xdndVersion = XDND_VERSION;