bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28605: 26.0.60; Part of leftmost character hidden


From: Robert Pluim
Subject: bug#28605: 26.0.60; Part of leftmost character hidden
Date: Thu, 05 Oct 2017 14:46:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

Robert Pluim <rpluim@gmail.com> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]