color-device: Create devices without a ready color manager
Every monitor should eventually have a corresponding color device. To make sure this can work, we must handle situations where the color manager didn't connect to colord yet, and thus isn't ready. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3904>
This commit is contained in:
@ -60,6 +60,7 @@
|
||||
enum
|
||||
{
|
||||
DEVICE_UPDATED,
|
||||
READY,
|
||||
|
||||
N_SIGNALS
|
||||
};
|
||||
@ -288,6 +289,7 @@ cd_client_connect_cb (GObject *source_object,
|
||||
color_manager);
|
||||
|
||||
priv->is_ready = TRUE;
|
||||
g_signal_emit (color_manager, signals[READY], 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -506,6 +508,13 @@ meta_color_manager_class_init (MetaColorManagerClass *klass)
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_COLOR_DEVICE);
|
||||
|
||||
signals[READY] =
|
||||
g_signal_new ("ready",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, 0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user