[gtk+/wip/baedert/drawing: 221/241] image: Fix snapshot position



commit c72e69c2f02967e123ea2542752b3b00e0d96690
Author: Timm Bäder <mail baedert org>
Date:   Tue May 30 20:06:20 2017 +0200

    image: Fix snapshot position

 gtk/gtkimage.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index 056507e..27bab54 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1353,15 +1353,13 @@ gtk_image_snapshot (GtkWidget   *widget,
 {
   GtkImage *image = GTK_IMAGE (widget);
   GtkImagePrivate *priv = gtk_image_get_instance_private (image);
-  GtkAllocation allocation;
   GtkAllocation content_allocation;
   int x, y, width, height;
   gint w, h, baseline;
 
-  gtk_widget_get_allocation (widget, &allocation);
   gtk_widget_get_content_allocation (widget, &content_allocation);
-  x = content_allocation.x - allocation.x;
-  y = content_allocation.y - allocation.y;
+  x = 0;
+  y = 0;
   width = content_allocation.width;
   height = content_allocation.height;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]