From: Daniel Boles Date: Tue, 29 Aug 2017 18:00:03 +0000 (+0100) Subject: TextView: :border-width broke window→widget coords X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~274 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=afd624bf4ba02d021b156bf478311fa875f7dcce;p=gtk%2B3.0.git TextView: :border-width broke window→widget coords 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 --- diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index f267c6c02d..61e6f63123 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -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;