TextView: :border-width broke window→widget coords
authorDaniel Boles <dboles@src.gnome.org>
Tue, 29 Aug 2017 18:00:03 +0000 (19:00 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Tue, 29 Aug 2017 18:04:26 +0000 (19:04 +0100)
Do the converse of commit bd7c87c762c75bbb8dfb5fed23964651188ef206 so
that a TextView with Container:border-width > 0 does not get its handles
and magnified region shifted up/left from where they should be.

https://bugzilla.gnome.org/show_bug.cgi?id=786986

gtk/gtktextview.c

index f267c6c02dd83b5595bb3fa625cdfb6894ff4e17..61e6f63123033b0faafa73121199f61dd303abfa 100644 (file)
@@ -5070,6 +5070,10 @@ _text_window_to_widget_coords (GtkTextView *text_view,
                                gint        *y)
 {
   GtkTextViewPrivate *priv = text_view->priv;
+  gint border_width = gtk_container_get_border_width (GTK_CONTAINER (text_view));
+
+  *x += border_width;
+  *y += border_width;
 
   if (priv->top_window)
     (*y) += priv->top_window->requisition.height;