[gtk+] examples: Use right function to query size



commit 3f7ada506ea1e2d390ac2d864d48d7e42097c2e3
Author: Benjamin Otte <otte redhat com>
Date:   Wed Nov 8 16:05:52 2017 +0100

    examples: Use right function to query size

 examples/drawing.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/examples/drawing.c b/examples/drawing.c
index 59d8bea..54d608e 100644
--- a/examples/drawing.c
+++ b/examples/drawing.c
@@ -27,8 +27,8 @@ configure_event_cb (GtkWidget         *widget,
 
   surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
                                                CAIRO_CONTENT_COLOR,
-                                               gtk_widget_get_allocated_width (widget),
-                                               gtk_widget_get_allocated_height (widget));
+                                               gtk_widget_get_width (widget),
+                                               gtk_widget_get_height (widget));
 
   /* Initialize the surface to white */
   clear_surface ();


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