diff options
Diffstat (limited to 'gtk/gtkoverlay.c')
-rw-r--r-- | gtk/gtkoverlay.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c index 3dc65aca77..90a930799b 100644 --- a/gtk/gtkoverlay.c +++ b/gtk/gtkoverlay.c @@ -673,17 +673,16 @@ gtk_overlay_snapshot (GtkWidget *widget, if (main_widget_node == NULL) { - GtkSnapshot child_snapshot; - - gtk_snapshot_init (&child_snapshot, - gtk_snapshot_get_renderer (snapshot), - snapshot->record_names, - NULL, - "OverlayCaptureMainChild"); - gtk_snapshot_offset (&child_snapshot, main_alloc.x, main_alloc.y); - gtk_widget_snapshot (main_widget, &child_snapshot); - gtk_snapshot_offset (&child_snapshot, -main_alloc.x, -main_alloc.y); - main_widget_node = gtk_snapshot_finish (&child_snapshot); + GtkSnapshot *child_snapshot; + + child_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot), + snapshot->record_names, + NULL, + "OverlayCaptureMainChild"); + gtk_snapshot_offset (child_snapshot, main_alloc.x, main_alloc.y); + gtk_widget_snapshot (main_widget, child_snapshot); + gtk_snapshot_offset (child_snapshot, -main_alloc.x, -main_alloc.y); + main_widget_node = gtk_snapshot_free_to_node (child_snapshot); graphene_matrix_init_translate (&translate, &GRAPHENE_POINT3D_INIT (main_alloc.x,main_alloc.y, 0)); } |