From f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 19 Oct 2024 23:03:29 +0100 Subject: internal: Move CMonitor to SP (#8178) * move monitors to sp * XD --- src/protocols/OutputManagement.hpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/protocols/OutputManagement.hpp') diff --git a/src/protocols/OutputManagement.hpp b/src/protocols/OutputManagement.hpp index f4a84475..6deab017 100644 --- a/src/protocols/OutputManagement.hpp +++ b/src/protocols/OutputManagement.hpp @@ -56,7 +56,7 @@ class COutputManager { COutputManager(SP resource_); bool good(); - void ensureMonitorSent(CMonitor* pMonitor); + void ensureMonitorSent(PHLMONITOR pMonitor); void sendDone(); // holds the states for this manager. @@ -70,7 +70,7 @@ class COutputManager { std::vector> heads; - void makeAndSendNewHead(CMonitor* pMonitor); + void makeAndSendNewHead(PHLMONITOR pMonitor); friend class COutputManagementProtocol; }; @@ -92,16 +92,16 @@ class COutputMode { class COutputHead { public: - COutputHead(SP resource_, CMonitor* pMonitor_); + COutputHead(SP resource_, PHLMONITOR pMonitor_); - bool good(); - void sendAllData(); // this has to be separate as we need to send the head first, then set the data - void updateMode(); - CMonitor* monitor(); + bool good(); + void sendAllData(); // this has to be separate as we need to send the head first, then set the data + void updateMode(); + PHLMONITOR monitor(); private: SP resource; - CMonitor* pMonitor = nullptr; + PHLMONITORREF pMonitor; void makeAndSendNewMode(SP mode); void sendCurrentMode(); @@ -119,7 +119,7 @@ class COutputHead { class COutputConfigurationHead { public: - COutputConfigurationHead(SP resource_, CMonitor* pMonitor_); + COutputConfigurationHead(SP resource_, PHLMONITOR pMonitor_); bool good(); @@ -127,11 +127,7 @@ class COutputConfigurationHead { private: SP resource; - CMonitor* pMonitor = nullptr; - - struct { - CHyprSignalListener monitorDestroy; - } listeners; + PHLMONITORREF pMonitor; friend class COutputConfiguration; }; -- cgit v1.2.3