protocols/gamma: fix GammaControl destroy conditions

This commit is contained in:
clague 2025-09-18 14:57:21 +08:00
parent 70a7047ee1
commit 88259cb794
No known key found for this signature in database
GPG key ID: B81A7CB54D1C02EA

View file

@ -179,7 +179,7 @@ void CGammaControlProtocol::onManagerResourceDestroy(wl_resource* res) {
}
void CGammaControlProtocol::destroyGammaControl(CGammaControl* gamma) {
std::erase_if(m_gammaControllers, [&](const auto& other) { return other.get() == gamma; });
std::erase_if(m_gammaControllers, [&](const auto& other) { return other->getMonitor() == gamma->getMonitor(); });
}
void CGammaControlProtocol::onGetGammaControl(CZwlrGammaControlManagerV1* pMgr, uint32_t id, wl_resource* output) {