Subject: Re: bug#28605: 26.0.60; Part of leftmost character hidden

From: Robert Pluim <[email-masked]>
Date: Tue, 03 Oct 2017 15:08:51 +0200

Ola Nilsson <[email-masked]> writes:

>> does your problem go away?  If so, then it would be interesting how the
>> values returned by xg_get_scale differ with gtk_widget_get_scale_factor
>> and xg_get_gdk_scale called.
>
> Made no difference what I can see, except a lot of messages :
>
> (emacs:2302): Gtk-CRITICAL **: gtk_distribute_natural_allocation:
> assertion 'extra_space >= 0' failed

Through inspection I noticed we're not adjusting the width of the
scrollbar for the scale. Does the following help?

diff --git a/src/gtkutil.c b/src/gtkutil.c
index 0da7039..60ba627 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3879,6 +3879,7 @@ xg_update_scrollbar_pos (struct frame *f,
       top /= scale;
       left /= scale;
       height /= scale;
+      width /= scale;
       left -= (scale - 1) * ((width / scale) >> 1);
 
       /* Clear out old position.  */