mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-19 01:40:10 +00:00
iconview: Check if the cr is clipped instead of using region
This commit is contained in:
parent
ab781bd89b
commit
c8b16f66b6
@ -1591,19 +1591,13 @@ gtk_icon_view_expose (GtkWidget *widget,
|
|||||||
for (icons = icon_view->priv->items; icons; icons = icons->next)
|
for (icons = icon_view->priv->items; icons; icons = icons->next)
|
||||||
{
|
{
|
||||||
GtkIconViewItem *item = icons->data;
|
GtkIconViewItem *item = icons->data;
|
||||||
GdkRectangle area;
|
|
||||||
|
|
||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
|
|
||||||
cairo_rectangle (cr, item->x, item->y, item->width, item->height);
|
cairo_rectangle (cr, item->x, item->y, item->width, item->height);
|
||||||
cairo_clip (cr);
|
cairo_clip (cr);
|
||||||
|
|
||||||
area.x = item->x;
|
if (gdk_cairo_get_clip_rectangle (cr, NULL))
|
||||||
area.y = item->y;
|
|
||||||
area.width = item->width;
|
|
||||||
area.height = item->height;
|
|
||||||
|
|
||||||
if (cairo_region_contains_rectangle (expose->region, &area) != CAIRO_REGION_OVERLAP_OUT)
|
|
||||||
{
|
{
|
||||||
gtk_icon_view_paint_item (icon_view, cr, item,
|
gtk_icon_view_paint_item (icon_view, cr, item,
|
||||||
item->x, item->y,
|
item->x, item->y,
|
||||||
|
Loading…
Reference in New Issue
Block a user