From 82fa9e676aad93f3860b1d81a198bed449a8f1ec Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Mon, 12 Aug 2024 23:42:22 +0200 Subject: [PATCH] color-device: Don't create colord profiles for virtual monitors Colord is a system service which will result in a polkit dialog showing up when connecting a remote session. We want to get rid of colord eventually anyway, so disconnecting virtual monitors from colord isn't an issue. Fixes: f5ce2ddf3c ("color-manager: Create color devices also for virtual monitors") Part-of: --- src/backends/meta-color-device.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backends/meta-color-device.c b/src/backends/meta-color-device.c index f7bf9339d..b0f2ff65f 100644 --- a/src/backends/meta-color-device.c +++ b/src/backends/meta-color-device.c @@ -293,7 +293,8 @@ meta_color_device_dispose (GObject *object) cd_device = color_device->cd_device; cd_device_id = color_device->cd_device_id; - if (!cd_device && cd_device_id && meta_color_manager_is_ready (color_manager)) + if (!cd_device && !color_device->is_ready && + cd_device_id && meta_color_manager_is_ready (color_manager)) { g_autoptr (GError) error = NULL; @@ -707,7 +708,11 @@ meta_color_device_new (MetaColorManager *color_manager, update_color_state (color_device); - if (meta_color_manager_is_ready (color_manager)) + if (meta_monitor_is_virtual (monitor)) + { + meta_color_device_notify_ready (color_device, FALSE); + } + else if (meta_color_manager_is_ready (color_manager)) { create_cd_device (color_device); }