From d71a7c901ded06f9f10846de245afd56b91aa585 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 29 Jul 2024 18:41:46 +0200 Subject: [PATCH] wayland: Do not use compositor-provided image descriptions When the compositor sends us an image description, we currently happily reuse it. However, those image descriptions may contain optional properties that we do not handle - example: reference white level. So if we were to reuse that image description, we would set a wrong reference white level. To avoid issues like that, never use compositor-provided image descriptions. However, query those image descriptions and map them to the closest GdkColorState, so that we can quickly look up *our* version of that image description and use that one. --- gdk/wayland/gdkwaylandcolor.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/gdk/wayland/gdkwaylandcolor.c b/gdk/wayland/gdkwaylandcolor.c index eab252c705..ad5ee63804 100644 --- a/gdk/wayland/gdkwaylandcolor.c +++ b/gdk/wayland/gdkwaylandcolor.c @@ -491,9 +491,6 @@ image_desc_info_done (void *data, cs = gdk_color_state_from_image_description_bits (desc); if (cs) { - g_hash_table_insert (self->color->cs_to_desc, - gdk_color_state_ref (cs), - desc->image_desc); g_hash_table_insert (self->color->id_to_cs, GUINT_TO_POINTER (desc->identity), gdk_color_state_ref (cs));