[gtk+/wip/baedert/drawing: 12/73] image: Fix snapshot position



commit c9c82b7599e912bfac2c6791e203de108e5132c1
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]