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:
@ -165,7 +165,8 @@ update_devices (MetaColorManager *color_manager)
|
||||
devices = g_hash_table_new_full (g_str_hash,
|
||||
g_str_equal,
|
||||
g_free,
|
||||
(GDestroyNotify) meta_color_device_destroy);
|
||||
(GDestroyNotify) g_object_unref);
|
||||
|
||||
for (l = meta_monitor_manager_get_monitors (monitor_manager); l; l = l->next)
|
||||
{
|
||||
MetaMonitor *monitor = META_MONITOR (l->data);
|
||||
|
Reference in New Issue
Block a user