[gtk+/rendering-cleanup-next: 162/199] quartz: Get rid of gdk_drawable_get_size() usage



commit 712bbb4bf91691366a7d78a0cb4a272724313b8b
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 20 12:53:06 2010 +0200

    quartz: Get rid of gdk_drawable_get_size() usage

 gdk/quartz/gdkdrawable-quartz.c |    9 ++++-----
 gdk/quartz/gdkwindow-quartz.c   |    5 ++---
 2 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gdk/quartz/gdkdrawable-quartz.c b/gdk/quartz/gdkdrawable-quartz.c
index e9ccc56..8c6a141 100644
--- a/gdk/quartz/gdkdrawable-quartz.c
+++ b/gdk/quartz/gdkdrawable-quartz.c
@@ -94,11 +94,10 @@ gdk_quartz_ref_cairo_surface (GdkDrawable *drawable)
 
   if (!impl->cairo_surface)
     {
-      int width, height;
-
-      gdk_drawable_get_size (impl->wrapper, &width, &height);
-      impl->cairo_surface = gdk_quartz_create_cairo_surface (drawable,
-                                                             width, height);
+      impl->cairo_surface = 
+          gdk_quartz_create_cairo_surface (drawable,
+                                           gdk_window_get_width (impl->wrapper),
+                                           gdk_window_get_height (impl->wrapper));
     }
   else
     cairo_surface_reference (impl->cairo_surface);
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 43c4915..ffdc83b 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -1246,9 +1246,8 @@ move_resize_window_internal (GdkWindow *window,
       old_visible.x = -private->x;
       old_visible.y = -private->y;
 
-      gdk_drawable_get_size (GDK_DRAWABLE (private->parent),
-                             &old_visible.width,
-                             &old_visible.height);
+      old_visible.width = private->width;
+      old_visible.height = private->height;
     }
 
   if (x != -1)



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