diff options
author | Benjamin Otte <otte@redhat.com> | 2018-07-14 05:26:33 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-07-14 05:27:54 +0200 |
commit | cbb1e74bb5be69d9538c71a47e238248e474bea5 (patch) | |
tree | 08754b1e8fc623232aeea03b2eabd7e740a7dd90 /gtk/gtktextutil.c | |
parent | 6afb6bb9d2c81136cddab97a541b1f8a863757da (diff) | |
download | gtk+-cbb1e74bb5be69d9538c71a47e238248e474bea5.tar.gz |
textview: Only create cairo context in gtktextdisplay.c
Everything else is done using GtkSnapshot now, including renaming the
draw_layer vfunc to snapshot_layer.
Diffstat (limited to 'gtk/gtktextutil.c')
-rw-r--r-- | gtk/gtktextutil.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c index 0298f88f03..9858bec5ad 100644 --- a/gtk/gtktextutil.c +++ b/gtk/gtktextutil.c @@ -276,7 +276,6 @@ gtk_text_util_create_rich_drag_icon (GtkWidget *widget, GtkTextAttributes *style; PangoContext *ltr_context, *rtl_context; GtkTextIter iter; - cairo_t *cr; g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); g_return_val_if_fail (GTK_IS_TEXT_BUFFER (buffer), NULL); @@ -333,12 +332,9 @@ gtk_text_util_create_rich_drag_icon (GtkWidget *widget, layout_height = MIN (layout_height, DRAG_ICON_MAX_HEIGHT); snapshot = gtk_snapshot_new (); - cr = gtk_snapshot_append_cairo (snapshot, - &GRAPHENE_RECT_INIT (0, 0, layout_width, layout_height)); - gtk_text_layout_draw (layout, widget, cr); + gtk_text_layout_snapshot (layout, widget, snapshot, &(GdkRectangle) { 0, 0, layout_width, layout_height }); - cairo_destroy (cr); g_object_unref (layout); g_object_unref (new_buffer); |