clutter: Drop various Color constructors

The fields are writable, there is no need to provide a custom constructor.
This shapes the Color API to be similar to GdkRGBA

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3802>
This commit is contained in:
Bilal Elmoussaoui
2024-06-11 20:18:23 +02:00
committed by Marge Bot
parent 04842393aa
commit 74ece2ad92
7 changed files with 14 additions and 107 deletions

View File

@ -329,7 +329,6 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
uint8_t red;
uint8_t green;
uint8_t blue;
ClutterColor color;
meta_display_get_monitor_geometry (display, i, &rect);
@ -348,10 +347,10 @@ on_monitors_changed (MetaMonitorManager *monitor_manager,
blue = g_rand_int_range (rand, 0, 255);
green = g_rand_int_range (rand, 0, 255);
red = g_rand_int_range (rand, 0, 255);
clutter_color_init (&color, red, green, blue, 255);
background = meta_background_new (display);
meta_background_set_color (background, &color);
meta_background_set_color (background,
&CLUTTER_COLOR_INIT (red, green, blue, 255));
meta_background_content_set_background (background_content, background);
g_object_unref (background);