screencopy: un-hdr screencopy buffers for cm-unaware clients (#11294)
This commit is contained in:
parent
a907ecd4ff
commit
9607e3b5a8
6 changed files with 39 additions and 10 deletions
|
|
@ -204,6 +204,10 @@ bool CColorManager::good() {
|
|||
return m_resource->resource();
|
||||
}
|
||||
|
||||
wl_client* CColorManager::client() {
|
||||
return m_resource->client();
|
||||
}
|
||||
|
||||
CColorManagementOutput::CColorManagementOutput(SP<CWpColorManagementOutputV1> resource, WP<CMonitor> monitor) : m_resource(resource), m_monitor(monitor) {
|
||||
if UNLIKELY (!good())
|
||||
return;
|
||||
|
|
@ -818,6 +822,10 @@ void CColorManagementProtocol::onMonitorImageDescriptionChanged(WP<CMonitor> mon
|
|||
feedback->onPreferredChanged();
|
||||
}
|
||||
|
||||
bool CColorManagementProtocol::isClientCMAware(wl_client* client) {
|
||||
return std::ranges::any_of(m_managers, [client](const auto& m) { return m->client() == client; });
|
||||
}
|
||||
|
||||
void CColorManagementProtocol::destroyResource(CColorManager* resource) {
|
||||
std::erase_if(m_managers, [&](const auto& other) { return other.get() == resource; });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue