color-device: Make it possible to outlive the active monitors

Previously the color device was destroyed when it was attached to a
monitor that was going away. However, the MetaMonitor objects are
ref-counted and can stay around for longer, even if the underlying
resources went away. We need color devices for as long as the
MetaMonitors are alive.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3904>
This commit is contained in:
Sebastian Wick
2024-07-18 16:24:34 +02:00
parent a10b56e946
commit 431c4d12b9
4 changed files with 5 additions and 11 deletions

View File

@ -621,13 +621,6 @@ meta_color_device_new (MetaColorManager *color_manager,
return color_device;
}
void
meta_color_device_destroy (MetaColorDevice *color_device)
{
g_object_run_dispose (G_OBJECT (color_device));
g_object_unref (color_device);
}
void
meta_color_device_update_monitor (MetaColorDevice *color_device,
MetaMonitor *monitor)