[gnome-builder/wip/gtk4-port] libide/webkit: fix favicon binding
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] libide/webkit: fix favicon binding
- Date: Fri, 3 Jun 2022 17:16:43 +0000 (UTC)
commit 08ac66e186c0fdd0eb3e5f8245c399f170ced919
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 3 09:35:42 2022 -0700
libide/webkit: fix favicon binding
src/libide/webkit/ide-webkit-page.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/webkit/ide-webkit-page.c b/src/libide/webkit/ide-webkit-page.c
index 0f3b9e970..94efa627d 100644
--- a/src/libide/webkit/ide-webkit-page.c
+++ b/src/libide/webkit/ide-webkit-page.c
@@ -61,12 +61,13 @@ transform_cairo_surface_to_gicon (GBinding *binding,
g_assert (to_value != NULL);
g_assert (IDE_IS_WEBKIT_PAGE (self));
- width = 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self));
- height = 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self));
-
- if (!(surface = g_value_get_boxed (from_value)))
+ /* No ownership transfer */
+ surface = g_value_get_pointer (from_value);
+ if (surface == NULL)
return TRUE;
+ width = 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self));
+ height = 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self));
favicon_width = cairo_image_surface_get_width (surface);
favicon_height = cairo_image_surface_get_height (surface);
pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, favicon_width, favicon_height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]