Commit 7927f7a4 authored by Christian Hergert's avatar Christian Hergert

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.
parent 605284bc
Pipeline #114860 passed with stages
in 7 minutes and 34 seconds
......@@ -5403,6 +5403,12 @@ draw_text (GtkWidget *widget,
gtk_snapshot_translate (snapshot, &translate);
gtk_snapshot_push_clip (snapshot,
SCREEN_WIDTH (widget),
SCREEN_HEIGHT (widget)));
context = gtk_widget_get_style_context (widget);
gtk_style_context_save_to_node (context, text_view->priv->text_window->css_node);
gtk_snapshot_render_background (snapshot, context,
......@@ -5433,6 +5439,8 @@ draw_text (GtkWidget *widget,
gtk_snapshot_restore (snapshot);
gtk_snapshot_pop (snapshot);
if (translate.x || translate.y)
gtk_snapshot_restore (snapshot);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment