mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
stack: Build stored render node with custom Snapshot object
This is in preparation for API changes in GtkSnapshot.
This commit is contained in:
parent
d9b0685b49
commit
4668e6dc63
@ -2093,11 +2093,17 @@ gtk_stack_render (GtkCssGadget *gadget,
|
||||
if (priv->last_visible_node == NULL &&
|
||||
priv->last_visible_child != NULL)
|
||||
{
|
||||
GtkSnapshot last_visible_snapshot;
|
||||
|
||||
gtk_widget_get_allocation (priv->last_visible_child->widget,
|
||||
&priv->last_visible_surface_allocation);
|
||||
gtk_snapshot_push (snapshot, FALSE, "StackCaptureLastVisibleChild");
|
||||
gtk_widget_snapshot (priv->last_visible_child->widget, snapshot);
|
||||
priv->last_visible_node = gtk_snapshot_pop (snapshot);
|
||||
gtk_snapshot_init (&last_visible_snapshot,
|
||||
gtk_snapshot_get_renderer (snapshot),
|
||||
snapshot->record_names,
|
||||
NULL,
|
||||
"StackCaptureLastVisibleChild");
|
||||
gtk_widget_snapshot (priv->last_visible_child->widget, &last_visible_snapshot);
|
||||
priv->last_visible_node = gtk_snapshot_finish (&last_visible_snapshot);
|
||||
}
|
||||
|
||||
gtk_snapshot_push_clip (snapshot,
|
||||
|
Loading…
Reference in New Issue
Block a user