forked from AuroraMiddleware/gtk
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:
parent
499b4bb60f
commit
3e836dd9fc
@ -1573,9 +1573,12 @@ gtk_stack_draw_slide (GtkWidget *widget,
|
||||
{
|
||||
GtkStack *stack = GTK_STACK (widget);
|
||||
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
|
||||
|
||||
if (priv->last_visible_surface &&
|
||||
gtk_cairo_should_draw_window (cr, priv->view_window))
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
gint x = 0;
|
||||
gint y = 0;
|
||||
int x, y;
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
|
||||
@ -1609,10 +1612,6 @@ gtk_stack_draw_slide (GtkWidget *widget,
|
||||
break;
|
||||
}
|
||||
|
||||
if (priv->last_visible_surface &&
|
||||
gtk_cairo_should_draw_window (cr, priv->view_window))
|
||||
|
||||
{
|
||||
cairo_save (cr);
|
||||
cairo_set_source_surface (cr, priv->last_visible_surface, x, y);
|
||||
cairo_paint (cr);
|
||||
|
Loading…
Reference in New Issue
Block a user