From 6452c21b854023961cbd7a10b26cb0e86ee2303a Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 16 Jul 2024 20:04:20 +0200 Subject: [PATCH] color-device: Let the device check if it should skip updating Not everything will require the device to be "ready" (i.e. have a ICC profile assigned). Part-of: --- src/backends/meta-color-device.c | 3 +++ src/backends/meta-color-manager.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/meta-color-device.c b/src/backends/meta-color-device.c index 0df0ab86c..b2b830a23 100644 --- a/src/backends/meta-color-device.c +++ b/src/backends/meta-color-device.c @@ -1234,6 +1234,9 @@ meta_color_device_update (MetaColorDevice *color_device) size_t lut_size; unsigned int temperature; + if (!meta_color_device_is_ready (color_device)) + return; + color_profile = meta_color_device_get_assigned_profile (color_device); if (!color_profile) return; diff --git a/src/backends/meta-color-manager.c b/src/backends/meta-color-manager.c index df74f7a3f..a3a7361d8 100644 --- a/src/backends/meta-color-manager.c +++ b/src/backends/meta-color-manager.c @@ -252,9 +252,6 @@ update_device_properties (MetaColorManager *color_manager) if (!color_device) continue; - if (!meta_color_device_is_ready (color_device)) - continue; - meta_color_device_update (color_device); } }