summaryrefslogtreecommitdiff
path: root/src/protocols/WaylandProtocol.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/WaylandProtocol.hpp')
-rw-r--r--src/protocols/WaylandProtocol.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/protocols/WaylandProtocol.hpp b/src/protocols/WaylandProtocol.hpp
index 6154fa30..4d4e7925 100644
--- a/src/protocols/WaylandProtocol.hpp
+++ b/src/protocols/WaylandProtocol.hpp
@@ -11,6 +11,12 @@
#define PROTO NProtocols
+class IWaylandProtocol;
+struct IWaylandProtocolDestroyWrapper {
+ wl_listener listener;
+ IWaylandProtocol* parent = nullptr;
+};
+
class IWaylandProtocol {
public:
IWaylandProtocol(const wl_interface* iface, const int& ver, const std::string& name);
@@ -26,7 +32,7 @@ class IWaylandProtocol {
Debug::log(level, std::format("[{}] ", m_szName) + std::vformat(fmt.get(), std::make_format_args(args...)));
};
- wl_listener m_liDisplayDestroy;
+ IWaylandProtocolDestroyWrapper m_liDisplayDestroy;
private:
std::string m_szName;