[gimp] app: use the window's allocation instead of gdk_drawable_get_size()



commit 37effb99a48d1d847e0459d9e267c0287b99d5c6
Author: Michael Natterer <mitch gimp org>
Date:   Fri Oct 15 15:17:12 2010 +0200

    app: use the window's allocation instead of gdk_drawable_get_size()

 app/widgets/gimpsessioninfo.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpsessioninfo.c b/app/widgets/gimpsessioninfo.c
index 2d5a9eb..f0b1fad 100644
--- a/app/widgets/gimpsessioninfo.c
+++ b/app/widgets/gimpsessioninfo.c
@@ -649,8 +649,12 @@ gimp_session_info_read_geometry (GimpSessionInfo *info)
 
       if (gimp_session_info_get_remember_size (info))
         {
-          gdk_drawable_get_size (GDK_DRAWABLE (window),
-                                 &info->p->width, &info->p->height);
+          GtkAllocation allocation;
+
+          gtk_widget_get_allocation (info->p->widget, &allocation);
+
+          info->p->width  = allocation.width;
+          info->p->height = allocation.height;
         }
       else
         {



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