summaryrefslogtreecommitdiff
path: root/src/protocols/ColorManagement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols/ColorManagement.cpp')
-rw-r--r--src/protocols/ColorManagement.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/protocols/ColorManagement.cpp b/src/protocols/ColorManagement.cpp
index bfab02e4..fce91691 100644
--- a/src/protocols/ColorManagement.cpp
+++ b/src/protocols/ColorManagement.cpp
@@ -266,7 +266,7 @@ CColorManagementSurface::CColorManagementSurface(SP<CWpColorManagementSurfaceV1>
return;
m_client = m_resource->client();
- m_imageDescription = DEFAULT_IMAGE_DESCRIPTION;
+ m_imageDescription = getDefaultImageDescription();
m_resource->setDestroy([this](CWpColorManagementSurfaceV1* r) {
LOGM(Log::TRACE, "Destroy wp cm surface {}", (uintptr_t)m_surface);
@@ -302,7 +302,7 @@ CColorManagementSurface::CColorManagementSurface(SP<CWpColorManagementSurfaceV1>
});
m_resource->setUnsetImageDescription([this](CWpColorManagementSurfaceV1* r) {
LOGM(Log::TRACE, "Unset image description for surface={}", (uintptr_t)r);
- m_imageDescription = DEFAULT_IMAGE_DESCRIPTION;
+ m_imageDescription = getDefaultImageDescription();
setHasImageDescription(false);
});
}
@@ -316,8 +316,10 @@ wl_client* CColorManagementSurface::client() {
}
const SImageDescription& CColorManagementSurface::imageDescription() {
- if (!hasImageDescription())
- LOGM(Log::WARN, "Reading imageDescription while none set. Returns default or empty values");
+ if (!hasImageDescription()) {
+ LOGM(Log::TRACE, "Reading imageDescription while none set. Returns default or empty values");
+ return getDefaultImageDescription()->value(); // JIC default settings change
+ }
return m_imageDescription->value();
}