[gtk] textview: use gtk_snapshot_new_with_parent()



commit c7a5d992869f04f3401af44bde640244c6fbb275
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 9 12:56:06 2019 -0700

    textview: use gtk_snapshot_new_with_parent()
    
    As recommended by Timm Bäder at:
    
    https://gitlab.gnome.org/GNOME/gtk/commit/3b959456ac5335639e9642571f59f17ec8ee97f7#note_621655

 gtk/gtktextlayout.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index d7c270a9dc..7b60b13f3f 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -86,6 +86,7 @@
 #include "gtktextutil.h"
 #include "gskpango.h"
 #include "gtkintl.h"
+#include "gtksnapshotprivate.h"
 #include "gtkwidgetprivate.h"
 #include "gtktextviewprivate.h"
 
@@ -4153,7 +4154,7 @@ gtk_text_layout_snapshot (GtkTextLayout      *layout,
 
           if (line_display->node == NULL)
             {
-              GtkSnapshot *sub = gtk_snapshot_new ();
+              GtkSnapshot *sub = gtk_snapshot_new_with_parent (snapshot);
 
               crenderer->snapshot = sub;
               render_para (crenderer, 0, line_display,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]