From a61eb7694df25a75f45502ed64b1536fda370c1d Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 21 Oct 2023 14:52:43 +0100 Subject: hooksystem: add callbackinfo struct and cancellable events --- src/protocols/XDGOutput.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/protocols/XDGOutput.cpp') diff --git a/src/protocols/XDGOutput.cpp b/src/protocols/XDGOutput.cpp index 94839e20..2ef0c3a6 100644 --- a/src/protocols/XDGOutput.cpp +++ b/src/protocols/XDGOutput.cpp @@ -58,9 +58,9 @@ void CXDGOutputProtocol::bindManager(wl_client* client, void* data, uint32_t ver } CXDGOutputProtocol::CXDGOutputProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { - g_pHookSystem->hookDynamic("monitorLayoutChanged", [this](void* self, std::any param) { this->updateAllOutputs(); }); - g_pHookSystem->hookDynamic("configReloaded", [this](void* self, std::any param) { this->updateAllOutputs(); }); - g_pHookSystem->hookDynamic("monitorRemoved", [this](void* self, std::any param) { + g_pHookSystem->hookDynamic("monitorLayoutChanged", [this](void* self, SCallbackInfo& info, std::any param) { this->updateAllOutputs(); }); + g_pHookSystem->hookDynamic("configReloaded", [this](void* self, SCallbackInfo& info, std::any param) { this->updateAllOutputs(); }); + g_pHookSystem->hookDynamic("monitorRemoved", [this](void* self, SCallbackInfo& info, std::any param) { const auto PMONITOR = std::any_cast(param); std::erase_if(m_vXDGOutputs, [&](const auto& other) { const auto REMOVE = other->monitor == PMONITOR; -- cgit v1.2.3