[gtk/wip/chergert/fix-textview-clip] textview: clip to text window when drawing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/fix-textview-clip] textview: clip to text window when drawing
- Date: Fri, 13 Sep 2019 23:27:02 +0000 (UTC)
commit a6d599d8fdfd579f7de751d5008e7704fa9b5797
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 13 16:26:26 2019 -0700
textview: clip to text window when drawing
When drawing the GtkTextView text, we need to clip to the visible area
so that we do not risk drawing under the border windows.
gtk/gtktextview.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 4568e735fe..61bb9d2f40 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -5423,7 +5423,13 @@ draw_text (GtkWidget *widget,
gtk_snapshot_restore (snapshot);
}
+ gtk_snapshot_push_clip (snapshot,
+ &GRAPHENE_RECT_INIT (0,
+ 0,
+ SCREEN_WIDTH (widget),
+ SCREEN_HEIGHT (widget)));
gtk_text_view_paint (widget, snapshot);
+ gtk_snapshot_pop (snapshot);
if (GTK_TEXT_VIEW_GET_CLASS (text_view)->snapshot_layer != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]