forked from AuroraMiddleware/gtk
stack: Update windows before allocating children
Doing things the other way around seems to cause problems in some cases where children want to do different things depending on the window position. https://bugzilla.gnome.org/show_bug.cgi?id=758563
This commit is contained in:
parent
11eab60f43
commit
373ce9f652
@ -2183,6 +2183,16 @@ gtk_stack_size_allocate (GtkWidget *widget,
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
{
|
||||
gdk_window_move_resize (priv->view_window,
|
||||
allocation->x, allocation->y,
|
||||
allocation->width, allocation->height);
|
||||
gdk_window_move_resize (priv->bin_window,
|
||||
get_bin_window_x (stack, allocation), get_bin_window_y (stack, allocation),
|
||||
allocation->width, allocation->height);
|
||||
}
|
||||
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.width = allocation->width;
|
||||
@ -2218,16 +2228,6 @@ gtk_stack_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_size_allocate (priv->visible_child->widget, &child_allocation);
|
||||
}
|
||||
}
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
{
|
||||
gdk_window_move_resize (priv->view_window,
|
||||
allocation->x, allocation->y,
|
||||
allocation->width, allocation->height);
|
||||
gdk_window_move_resize (priv->bin_window,
|
||||
get_bin_window_x (stack, allocation), get_bin_window_y (stack, allocation),
|
||||
allocation->width, allocation->height);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user