}
void
-_gtk_style_context_coalesce_animation_areas (GtkStyleContext *context)
+_gtk_style_context_coalesce_animation_areas (GtkStyleContext *context,
+ gint rel_x,
+ gint rel_y)
{
GtkStyleContextPrivate *priv;
GSList *l;
cairo_rectangle_int_t *rect;
rect = &g_array_index (info->rectangles, cairo_rectangle_int_t, i);
+ rect->x += rel_x;
+ rect->y += rel_y;
+
cairo_region_union_rectangle (info->invalidation_region, rect);
}
g_array_remove_range (info->rectangles, 0, info->rectangles->len);
}
+
+ priv->animations_invalidated = FALSE;
}
static void
GType widget_type,
GParamSpec *pspec);
void _gtk_style_context_invalidate_animation_areas (GtkStyleContext *context);
-void _gtk_style_context_coalesce_animation_areas (GtkStyleContext *context);
+void _gtk_style_context_coalesce_animation_areas (GtkStyleContext *context,
+ gint rel_x,
+ gint rel_y);
/* Animation for state changes */
void gtk_style_context_state_transition_start (GtkStyleContext *context,
GtkWidgetPrivate *priv;
GdkExtensionMode mode;
cairo_region_t *region;
- GtkStyleContext *context;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (widget->priv->anchored ||
cairo_t *cr,
gboolean clip_to_size)
{
+ GtkStyleContext *context;
+
if (!gtk_widget_is_drawable (widget))
return;
0, cr,
&result);
}
+
+ context = gtk_widget_get_style_context (widget);
+ _gtk_style_context_coalesce_animation_areas (context,
+ widget->priv->allocation.x,
+ widget->priv->allocation.y);
}
/**
cairo_t *cr;
int x, y;
gboolean do_clip;
- GtkStyleContext *context;
g_return_val_if_fail (GTK_IS_WIDGET (widget), TRUE);
g_return_val_if_fail (gtk_widget_get_realized (widget), TRUE);
gtk_cairo_set_event (cr, NULL);
cairo_destroy (cr);
- context = gtk_widget_get_style_context (widget);
- _gtk_style_context_coalesce_animation_areas (context);
-
return result;
}