[gtk+/rendering-cleanup: 16/41] x11: _gdk_x11_drawable_update_size() => _gdk_x11_window_update_size()



commit 6c3fe64bc4ec32372737ef448c5fd01d33098b1b
Author: Benjamin Otte <otte redhat com>
Date:   Wed Oct 6 04:03:23 2010 +0200

    x11: _gdk_x11_drawable_update_size() => _gdk_x11_window_update_size()

 gdk/x11/gdkdisplay-x11.c  |    4 ++--
 gdk/x11/gdkdrawable-x11.h |    2 --
 gdk/x11/gdkwindow-x11.c   |   18 ++++++++----------
 gdk/x11/gdkwindow-x11.h   |   10 ++++++----
 4 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index b7f1b6b..7e6336a 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -693,7 +693,7 @@ gdk_display_x11_translate_event (GdkEventTranslator *translator,
 	  window_private->height = xevent->xconfigure.height;
 
 	  _gdk_window_update_size (window);
-	  _gdk_x11_drawable_update_size (window_private->impl);
+	  _gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (window_private->impl));
 	  _gdk_x11_screen_size_changed (screen, xevent);
         }
 
@@ -749,7 +749,7 @@ gdk_display_x11_translate_event (GdkEventTranslator *translator,
 	  window_private->height = xevent->xconfigure.height;
 
 	  _gdk_window_update_size (window);
-	  _gdk_x11_drawable_update_size (window_private->impl);
+	  _gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (window_private->impl));
 
 	  if (window_private->resize_count >= 1)
 	    {
diff --git a/gdk/x11/gdkdrawable-x11.h b/gdk/x11/gdkdrawable-x11.h
index 078e611..03c621e 100644
--- a/gdk/x11/gdkdrawable-x11.h
+++ b/gdk/x11/gdkdrawable-x11.h
@@ -58,8 +58,6 @@ struct _GdkDrawableImplX11Class
 
 GType _gdk_drawable_impl_x11_get_type (void);
 
-/* Note that the following take GdkDrawableImplX11, not the wrapper drawable */
-void _gdk_x11_drawable_update_size      (GdkDrawable  *drawable);
 
 G_END_DECLS
 
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 2ba9a68..83fed59 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -171,17 +171,15 @@ _gdk_x11_window_get_toplevel (GdkWindow *window)
 static const cairo_user_data_key_t gdk_x11_cairo_key;
 
 /**
- * _gdk_x11_drawable_update_size:
- * @drawable: a #GdkDrawableImplX11.
+ * _gdk_x11_window_update_size:
+ * @impl: a #GdkWindowImplX11.
  * 
- * Updates the state of the drawable (in particular the drawable's
+ * Updates the state of the window (in particular the drawable's
  * cairo surface) when its size has changed.
  **/
 void
-_gdk_x11_drawable_update_size (GdkDrawable *drawable)
+_gdk_x11_window_update_size (GdkWindowImplX11 *impl)
 {
-  GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (drawable);
-  
   if (impl->cairo_surface)
     {
       cairo_xlib_surface_set_size (impl->cairo_surface,
@@ -1565,7 +1563,7 @@ window_x11_resize (GdkWindow *window,
         {
           private->width = width;
           private->height = height;
-          _gdk_x11_drawable_update_size (private->impl);
+          _gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (private->impl));
         }
       else
         {
@@ -1574,7 +1572,7 @@ window_x11_resize (GdkWindow *window,
         }
     }
 
-  _gdk_x11_drawable_update_size (private->impl);
+  _gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (private->impl));
 }
 
 static inline void
@@ -1595,7 +1593,7 @@ window_x11_move_resize (GdkWindow *window,
   if (GDK_WINDOW_TYPE (private) == GDK_WINDOW_CHILD)
     {
       _gdk_window_move_resize_child (window, x, y, width, height);
-      _gdk_x11_drawable_update_size (private->impl);
+      _gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (private->impl));
     }
   else
     {
@@ -1613,7 +1611,7 @@ window_x11_move_resize (GdkWindow *window,
           private->width = width;
           private->height = height;
 
-          _gdk_x11_drawable_update_size (private->impl);
+          _gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (private->impl));
         }
       else
         {
diff --git a/gdk/x11/gdkwindow-x11.h b/gdk/x11/gdkwindow-x11.h
index f0292ec..77eb32b 100644
--- a/gdk/x11/gdkwindow-x11.h
+++ b/gdk/x11/gdkwindow-x11.h
@@ -158,10 +158,12 @@ void            _gdk_x11_window_tmp_reset_bg        (GdkWindow *window,
 void            _gdk_x11_window_tmp_unset_parent_bg (GdkWindow *window);
 void            _gdk_x11_window_tmp_reset_parent_bg (GdkWindow *window);
 
-GdkCursor      *_gdk_x11_window_get_cursor    (GdkWindow *window);
-void            _gdk_x11_window_get_offsets   (GdkWindow *window,
-                                               gint      *x_offset,
-                                               gint      *y_offset);
+GdkCursor      *_gdk_x11_window_get_cursor          (GdkWindow *window);
+void            _gdk_x11_window_get_offsets         (GdkWindow *window,
+                                                     gint      *x_offset,
+                                                     gint      *y_offset);
+
+void            _gdk_x11_window_update_size         (GdkWindowImplX11 *impl);
 
 G_END_DECLS
 



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