summaryrefslogtreecommitdiff
path: root/src/protocols/core/Output.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-07-22 16:56:51 +0200
committerVaxry <vaxry@vaxry.net>2024-07-22 16:56:51 +0200
commit5bae7f150b228d3bf677d09fd0c320328b0d0ff0 (patch)
tree4713f93b61411378071abc08117e2caae137b2ab /src/protocols/core/Output.hpp
parent83a5395eaa99fecef777827fff1de486c06b6180 (diff)
wayland/output: avoid sending events to dead outputs
ref #6835
Diffstat (limited to 'src/protocols/core/Output.hpp')
-rw-r--r--src/protocols/core/Output.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/protocols/core/Output.hpp b/src/protocols/core/Output.hpp
index 46e4057b..49c32ec1 100644
--- a/src/protocols/core/Output.hpp
+++ b/src/protocols/core/Output.hpp
@@ -8,6 +8,7 @@
#include "../../helpers/signal/Signal.hpp"
class CMonitor;
+class CWLOutputProtocol;
class CWLOutputResource {
public:
@@ -20,7 +21,7 @@ class CWLOutputResource {
void updateState();
WP<CMonitor> monitor;
-
+ WP<CWLOutputProtocol> owner;
WP<CWLOutputResource> self;
private:
@@ -40,6 +41,7 @@ class CWLOutputProtocol : public IWaylandProtocol {
void sendDone();
WP<CMonitor> monitor;
+ WP<CWLOutputProtocol> self;
// will mark the protocol for removal, will be removed when no. of bound outputs is 0 (or when overwritten by a new global)
void remove();
@@ -61,5 +63,5 @@ class CWLOutputProtocol : public IWaylandProtocol {
};
namespace PROTO {
- inline std::unordered_map<std::string, UP<CWLOutputProtocol>> outputs;
+ inline std::unordered_map<std::string, SP<CWLOutputProtocol>> outputs;
};