Subject: bug#18990: 25.0.50; Scroll bar display problems

From: Stephen Berman <[email-masked]>
Date: Sat, 08 Nov 2014 22:12:41 +0100

On Sat, 08 Nov 2014 18:00:43 +0100 martin rudalics <[email-masked]> wrote:

>> That possibility didn't occur to me.  Is there some command I can call,
>> or some other way to convince myself that this is what is happening (not
>> that I don't believe you, I'd just like to understand it).
>
> I suppose the window manager simply crops everything that doesn't fit
> within its external borders.  You should be able to convince yourself
> for a single window frame by removing modeline and echo area and
> decreasing the height of the horizontal scroll bar.

As I mentioned (quoted below), I was already convinced by seeing the
horizontal scroll bar partially cover the mode line.  But by using a
separate minibuffer frame (I suppose that's what you mean by removing
the echo area), I do indeed see the analog with the horizontal scroll
bar of what I see with the narrowed vertical scroll bar on the right: it
is at the very bottom of the frame and cut off.  Quite convincing,
indeed.  Thanks for the suggestion.

>> And why does
>> it happen on the right but not on the left (nor on the right side of a
>> non-right window)?
>
> It doesn't happen on the left or for non-right windows because in this
> case the (default sized) scroll bar gets drawn into Emacs' client area
> and the window manager assumes that Emacs knows how to deal with it.

Ok.

>> I meant Emacs can make it thinner, since it didn't occur to me that the
>> appearance of the right scroll bar could be due to the WM.
>
> We must discriminate: Emacs reserves the area as you specify it.  Gtk
> draws its slider into that area alas with a width determined by the
> theme or a resource file.

>> Indeed: with (modify-all-frames-parameters '((scroll-bar-width . 32)))
>> the scroll bar
>
> ... more precisely, the slider ...
>
>> still has the default width but there are nearly equally
>> wide spaces on both sides of it (between the scroll and the fringe to
>> the left and between the scroll bar and the frame border to the right).
>> Ok, this convinces me that Emacs is not modifying the width.
>
> ... the width of the slider.

I'm not sure I understand the distinction you're making.  By "slider" do
you mean what is sometimes called the "thumb" of the scroll bar?
(According to Wikipedia, a slider is a different kind of widget from a
scroll bar, but I didn't try checking other sources.)  If so, are you
saying that Gtk only controls the width (or height) of the slider
(thumb), while Emacs controls the size of its container, which I guess
is the scroll bar taken as a whole?

>> As I mentioned, I can't simply build both the Lucid and the Gtk builds
>> on my system, apparently due to incompatible libpng requirements.
>
> Maybe Jan has an idea.

He did :)

>> Anyway, it seems that the appropriate fix for this bug it to make
>> modifying the scroll-bar-width and scroll-bar-height frame parameters
>> noops in Gtk builds.
>
> Another problem is that currently we prescribe a minimum width for
> scroll bars which has parts of the scroll bar background change
> appearance when the Gtk slider is narrower.

Not sure I understand; can you elaborate or tell me how I can see what
you mean?

Steve Berman