gdk: Fix compiler warning
authorBenjamin Otte <otte@redhat.com>
Tue, 29 Aug 2023 17:34:38 +0000 (19:34 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 28 Sep 2023 00:42:44 +0000 (20:42 -0400)
gcc's -Wlto-type-mismatch found the hack, where we copied the wrong
prototype.

gdk/gdkpaintable.c

index 071b99e61dfeacb7e44d2feee13ca45d9222b6da..9b4a9b113a33ae10d9d5a29718c809117c671f11 100644 (file)
 #include "gdksnapshotprivate.h"
 #include "gdkprivate.h"
 
+#include <graphene.h>
+
 /* HACK: So we don't need to include any (not-yet-created) GSK or GTK headers */
 GdkSnapshot *   gtk_snapshot_new                        (void);
 void            gtk_snapshot_push_debug                 (GdkSnapshot            *snapshot,
                                                          const char             *message,
                                                          ...) G_GNUC_PRINTF (2, 3);
 void            gtk_snapshot_pop                        (GdkSnapshot            *snapshot);
-GdkPaintable *  gtk_snapshot_free_to_paintable          (GdkSnapshot            *snapshot);
+GdkPaintable *  gtk_snapshot_free_to_paintable          (GdkSnapshot            *snapshot,
+                                                         const graphene_size_t  *size);
 
 /**
  * GdkPaintable:
@@ -118,7 +121,7 @@ gdk_paintable_default_get_current_image (GdkPaintable *paintable)
 
   snapshot = gtk_snapshot_new ();
   gdk_paintable_snapshot (paintable, snapshot, width, height);
-  return gtk_snapshot_free_to_paintable (snapshot);
+  return gtk_snapshot_free_to_paintable (snapshot, NULL);
 }
 
 static GdkPaintableFlags