summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-07-01 08:47:51 +0200
committerMatthias Clasen <mclasen@redhat.com>2017-07-19 21:27:15 -0400
commitd832001baa3dcf03852bf1306918b54a2f9e6622 (patch)
treed5197a8744625c7d7ab419d3709062b181c1bac1 /gtk
parent451a991488d00c3e3e2fa376f2f44c82bcc01cfb (diff)
downloadgtk+-d832001baa3dcf03852bf1306918b54a2f9e6622.tar.gz
textview: Use correct size for cairo node bounds
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtktextview.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index da85d627c9..5c2ee26ee5 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5905,11 +5905,12 @@ gtk_text_view_snapshot (GtkWidget *widget,
GtkStyleContext *context;
graphene_rect_t bounds;
cairo_t *cr;
+ int width, height;
+ gtk_widget_get_content_size (widget, &width, &height);
graphene_rect_init (&bounds,
0, 0,
- gtk_widget_get_allocated_width (widget),
- gtk_widget_get_allocated_height (widget));
+ width, height);
cr = gtk_snapshot_append_cairo (snapshot, &bounds, "GtkTextView");