stack: Scope some variables so that the code is clearer
... that the allocation magic here is for the transition of the last visible child that's sliding out.
This commit is contained in:
@ -1573,9 +1573,12 @@ gtk_stack_draw_slide (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
GtkStack *stack = GTK_STACK (widget);
|
GtkStack *stack = GTK_STACK (widget);
|
||||||
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
|
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
|
||||||
|
|
||||||
|
if (priv->last_visible_surface &&
|
||||||
|
gtk_cairo_should_draw_window (cr, priv->view_window))
|
||||||
|
{
|
||||||
GtkAllocation allocation;
|
GtkAllocation allocation;
|
||||||
gint x = 0;
|
int x, y;
|
||||||
gint y = 0;
|
|
||||||
|
|
||||||
gtk_widget_get_allocation (widget, &allocation);
|
gtk_widget_get_allocation (widget, &allocation);
|
||||||
|
|
||||||
@ -1609,10 +1612,6 @@ gtk_stack_draw_slide (GtkWidget *widget,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->last_visible_surface &&
|
|
||||||
gtk_cairo_should_draw_window (cr, priv->view_window))
|
|
||||||
|
|
||||||
{
|
|
||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
cairo_set_source_surface (cr, priv->last_visible_surface, x, y);
|
cairo_set_source_surface (cr, priv->last_visible_surface, x, y);
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
|
|||||||
Reference in New Issue
Block a user