internal: Move CMonitor to SP (#8178)

* move monitors to sp

* XD
This commit is contained in:
Vaxry
2024-10-19 23:03:29 +01:00
committed by GitHub
parent ce3ba798df
commit f044e4c951
66 changed files with 424 additions and 446 deletions

View File

@@ -14,13 +14,13 @@ class CGammaControl {
CGammaControl(SP<CZwlrGammaControlV1> resource_, wl_resource* output);
~CGammaControl();
bool good();
void applyToMonitor();
CMonitor* getMonitor();
bool good();
void applyToMonitor();
PHLMONITOR getMonitor();
private:
SP<CZwlrGammaControlV1> resource;
WP<CMonitor> pMonitor;
PHLMONITORREF pMonitor;
size_t gammaSize = 0;
bool gammaTableSet = false;
std::vector<uint16_t> gammaTable; // [r,g,b]+
@@ -39,7 +39,7 @@ class CGammaControlProtocol : public IWaylandProtocol {
virtual void bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id);
void applyGammaToState(CMonitor* pMonitor);
void applyGammaToState(PHLMONITOR pMonitor);
private:
void onManagerResourceDestroy(wl_resource* res);