[gtk+/client-side-windows: 52/284] Remove unnecessary clear_area method in GdkWindowImpl



commit f22211c88150ff4f1ec6de11bc0d84504cd6e197
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Dec 15 14:34:52 2008 +0100

    Remove unnecessary clear_area method in GdkWindowImpl
---
 gdk/gdkoffscreenwindow.c |   45 ---------------------------------------------
 gdk/gdkwindow.c          |    2 --
 gdk/gdkwindowimpl.h      |    6 ------
 gdk/x11/gdkwindow-x11.c  |   15 ---------------
 4 files changed, 0 insertions(+), 68 deletions(-)

diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 72bb5b6..7f87b82 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -75,13 +75,6 @@ struct _GdkOffscreenWindowClass
 
 static void       gdk_offscreen_window_impl_iface_init    (GdkWindowImplIface         *iface);
 static void       gdk_offscreen_window_hide               (GdkWindow                  *window);
-static void       gdk_offscreen_window_clear_area         (GdkWindow                  *window,
-							   gint                        x,
-							   gint                        y,
-							   gint                        width,
-							   gint                        height,
-							   gboolean                    send_expose);
-
 
 G_DEFINE_TYPE_WITH_CODE (GdkOffscreenWindow,
                          gdk_offscreen_window,
@@ -962,43 +955,6 @@ setup_backing_rect_gc (GdkWindow *window, int x_offset, int y_offset)
 }
 
 static void
-gdk_offscreen_window_clear_area (GdkWindow *window,
-				 gint       x,
-				 gint       y,
-				 gint       width,
-				 gint       height,
-				 gboolean   send_expose)
-{
-  GdkGC *gc;
-  
-  if (GDK_WINDOW_DESTROYED (window))
-    return;
-
-  /* Actual drawing is done by gdkwindow.c */
-
-  gc = setup_backing_rect_gc (window, 0, 0);
-  gdk_draw_rectangle (window, gc, TRUE, x, y, width, height);
-  g_object_unref (gc);
-  
-  if (send_expose)
-    {
-      GdkRectangle visible, rect;
-
-      visible.x = visible.y = 0;
-      gdk_drawable_get_size (GDK_DRAWABLE (window), &visible.width, &visible.height);
-
-      rect.x = x;
-      rect.y = x;
-      rect.width = width;
-      rect.height = height;
-
-      gdk_rectangle_intersect (&rect, &visible, &rect);
-
-      gdk_window_invalidate_rect (window, &rect, TRUE);
-    }
-}
-
-static void
 gdk_offscreen_window_set_background (GdkWindow      *window,
 				     const GdkColor *color)
 {
@@ -1208,7 +1164,6 @@ gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->set_back_pixmap = gdk_offscreen_window_set_back_pixmap;
   iface->get_events = gdk_offscreen_window_get_events;
   iface->set_events = gdk_offscreen_window_set_events;
-  iface->clear_area = gdk_offscreen_window_clear_area;
   iface->reparent = gdk_offscreen_window_reparent;
   iface->set_cursor = gdk_offscreen_window_set_cursor;
   iface->get_geometry = gdk_offscreen_window_get_geometry;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index a823e03..81d8dd2 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3529,8 +3529,6 @@ gdk_window_clear_area_internal (GdkWindow *window,
     {
       if (private->redirect)
 	gdk_window_clear_backing_rect_redirect (window, x, y, width, height);
-
-      
       
       gdk_window_clear_backing_rect_direct (window, x, y, width, height);
       if (send_expose)
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index 7ffd388..3509d87 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -56,12 +56,6 @@ struct _GdkWindowImplIface
                                          gint             y,
                                          gint             width,
                                          gint             height);
-  void         (* clear_area)           (GdkWindow       *window,
-                                         gint             x,
-                                         gint             y,
-                                         gint             width,
-                                         gint             height,
-                                         gboolean         send_expose);
   void         (* set_background)       (GdkWindow       *window,
                                          const GdkColor  *color);
   void         (* set_back_pixmap)      (GdkWindow       *window,
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 27ab045..86d7586 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -1670,20 +1670,6 @@ gdk_window_x11_reparent (GdkWindow *window,
 }
 
 static void
-gdk_window_x11_clear_area (GdkWindow *window,
-                           gint       x,
-                           gint       y,
-                           gint       width,
-                           gint       height,
-                           gboolean   send_expose)
-{
-  if (!GDK_WINDOW_DESTROYED (window))
-    XClearArea (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window),
-		x, y, width, height,
-                send_expose);
-}
-
-static void
 gdk_window_x11_raise (GdkWindow *window)
 {
   if (!GDK_WINDOW_DESTROYED (window))
@@ -5923,7 +5909,6 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
   iface->withdraw = gdk_window_x11_withdraw;
   iface->set_events = gdk_window_x11_set_events;
   iface->get_events = gdk_window_x11_get_events;
-  iface->clear_area = gdk_window_x11_clear_area;
   iface->raise = gdk_window_x11_raise;
   iface->lower = gdk_window_x11_lower;
   iface->move_resize = gdk_window_x11_move_resize;



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