color-device: Avoid roundtrip through manager when assining a profile
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3904>
This commit is contained in:
parent
6452c21b85
commit
25e5c59202
@ -36,7 +36,6 @@
|
||||
enum
|
||||
{
|
||||
READY,
|
||||
CHANGED,
|
||||
UPDATED,
|
||||
|
||||
N_SIGNALS
|
||||
@ -157,7 +156,7 @@ ensure_default_profile_cb (GObject *source_object,
|
||||
|
||||
g_set_object (&color_device->assigned_profile, color_profile);
|
||||
|
||||
g_signal_emit (color_device, signals[CHANGED], 0);
|
||||
meta_color_device_update (color_device);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -319,12 +318,6 @@ meta_color_device_class_init (MetaColorDeviceClass *klass)
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
G_TYPE_BOOLEAN);
|
||||
signals[CHANGED] =
|
||||
g_signal_new ("changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, 0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
signals[UPDATED] =
|
||||
g_signal_new ("updated",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -118,13 +118,6 @@ on_device_ready (MetaColorDevice *color_device,
|
||||
meta_color_device_update (color_device);
|
||||
}
|
||||
|
||||
static void
|
||||
on_device_changed (MetaColorDevice *color_device,
|
||||
MetaColorManager *color_manager)
|
||||
{
|
||||
meta_color_device_update (color_device);
|
||||
}
|
||||
|
||||
static void
|
||||
on_device_updated (MetaColorDevice *color_device,
|
||||
MetaColorManager *color_manager)
|
||||
@ -212,9 +205,6 @@ update_devices (MetaColorManager *color_manager)
|
||||
g_signal_connect_object (color_device, "ready",
|
||||
G_CALLBACK (on_device_ready),
|
||||
color_manager, 0);
|
||||
g_signal_connect_object (color_device, "changed",
|
||||
G_CALLBACK (on_device_changed),
|
||||
color_manager, 0);
|
||||
g_signal_connect_object (color_device, "updated",
|
||||
G_CALLBACK (on_device_updated),
|
||||
color_manager, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user