From b937c1798585be7ccc0de512302327bb0d7b442f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 27 Nov 2023 13:58:38 -0500 Subject: [PATCH 1/2] wayland: Be more careful when loading cursors Make sure we don't access the cursor_images array out of bounds. Related: #6234 --- gdk/wayland/gdkcursor-wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c index 35a07b564a..4b193e3694 100644 --- a/gdk/wayland/gdkcursor-wayland.c +++ b/gdk/wayland/gdkcursor-wayland.c @@ -175,7 +175,7 @@ _gdk_wayland_cursor_get_buffer (GdkWaylandDisplay *display, _gdk_wayland_display_get_cursor_theme (display), desired_scale, gdk_cursor_get_name (cursor)); - if (c) + if (c && c->image_count > 0) { struct wl_cursor_image *image; int cursor_scale; From 96f7bb99a78d8479a321c5ad60801e21d923cf85 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 27 Nov 2023 15:29:57 -0500 Subject: [PATCH 2/2] css: Fix opacity handling We were using the invert value for opacity. --- gtk/gtkcssfiltervalue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkcssfiltervalue.c b/gtk/gtkcssfiltervalue.c index 6f59ed0b63..fe2bddb116 100644 --- a/gtk/gtkcssfiltervalue.c +++ b/gtk/gtkcssfiltervalue.c @@ -214,7 +214,7 @@ gtk_css_filter_get_matrix (const GtkCssFilter *filter, break; case GTK_CSS_FILTER_OPACITY: - value = _gtk_css_number_value_get (filter->invert.value, 1.0); + value = _gtk_css_number_value_get (filter->opacity.value, 1.0); graphene_matrix_init_from_float (matrix, (float[16]) { 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0,