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

From: Robert Pluim <[email-masked]>
Date: Thu, 05 Oct 2017 14:46:11 +0200

Robert Pluim <[email-masked]> writes:

> The horizontal fix is somewhat cargo-culted from the vertical case,
> so I'm not 100% sure that this hunk is correct (why is it only
> adjusting the width and the x position? Should it adjust the height/y
> for the horizontal case?):
>
> +       {
> +         /* Clear under old scroll bar position.  */
> +         oldw += (scale - 1) * oldw;
> +         oldx -= (scale - 1) * oldw;
> +         x_clear_area (f, oldx, oldy, oldw, oldh);
> +       }

Thinking about this some more, this whole calculation just looks
wrong. oldx, oldw, oldw and oldh are in unscaled pixels, as far as I
can tell. We need to scale when using GTK routines, but x_clear_area
ends up calling X11 routines, so I've almost convinced myself that we
should in fact delete the oldw and oldx adjustments for the vertical
scrollbar rather than adding them for the horizontal one.

That code was added in commit c0055ff5b03c9121ab5bf752496b09416f0f0a7d
which is quite old, I suspect it did no real harm even though oldx
tends to end up negative, possibly x_clear_area does some kind of
clipping.

Robert