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

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

martin rudalics <[email-masked]> writes:

>> Yes, I think removing the calculation for left is the correct fix (at
>> least it looks correct here). The horizontal scrollbars need fixing as
>> well, see below.
>
> Looks good to me.  Ola, can you check whether Robert's patch fixes
> horizontal scroll bars on your system?

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);
+       }

>> xg_update_scrollbar_pos and xg_update_horizontal_scrollbar_pos
>> are now 99% identical apart from the 'hidden' check.
>
> Could you refactor them?

Not until I or somebody else understands them better :-)

> Note that unless you have done so already, you
> will probably have to sign papers anyway so that we can install your
> patch.  If you don't sign, we can probably apply the fix for vertical
> scroll bars at most.  Eli will decide how to proceed then.

I sent off a request to [email-masked] more than a month ago, and have
heard nothing back (and have also pinged the copyright clerk at the
FSF). Help?

Worst case I can put the changes in the public domain.

>> I don't think this will be the final version: I sometimes get the echo
>> area being the wrong size...
>
> How?  Is the mode line of the window above fully visible or does the
> horizontal scroll bar overdraw the mode line of its window and the echo
> area?

False alarm. Looks like my window manager is not giving Emacs the
correct height when I maximize the frame, so the window behind it was
showing through (although I guess that could also be an Emacs bug,
just not related to this one, since it happens without scroll bars).

Robert