[gtk+] iconview: Check if the cr is clipped instead of using region
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk+] iconview: Check if the cr is clipped instead of using region
- Date: Sun, 26 Sep 2010 13:35:37 +0000 (UTC)
commit c8b16f66b63eea8dcefef7509d9bd9dff6b7782e
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 6 18:44:32 2010 +0200
    iconview: Check if the cr is clipped instead of using region
 gtk/gtkiconview.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index f95e5c9..71869bc 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1591,19 +1591,13 @@ gtk_icon_view_expose (GtkWidget *widget,
   for (icons = icon_view->priv->items; icons; icons = icons->next) 
     {
       GtkIconViewItem *item = icons->data;
-      GdkRectangle area;
       
       cairo_save (cr);
 
       cairo_rectangle (cr, item->x, item->y, item->width, item->height);
       cairo_clip (cr);
 
-      area.x = item->x;
-      area.y = item->y;
-      area.width = item->width;
-      area.height = item->height;
-	
-      if (cairo_region_contains_rectangle (expose->region, &area) != CAIRO_REGION_OVERLAP_OUT)
+      if (gdk_cairo_get_clip_rectangle (cr, NULL))
         {
           gtk_icon_view_paint_item (icon_view, cr, item,
                                     item->x, item->y,
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]