Subject: bug#74435: Scrollbar width is not respected on Windows

From: Cecilio Pardo <[email-masked]>
Date: Fri, 22 Nov 2024 08:45:39 +0100

On 22/11/2024 7:53, Eli Zaretskii wrote:
>> Date: Thu, 21 Nov 2024 23:21:05 +0100
>> Cc: [email-masked], [email-masked]
>> From: Cecilio Pardo <[email-masked]>
>>
>> I have tracked (I think) this problem to the function
>> frame.c:gui_set_scroll_bar_width
>>
>> If the new value for the scrollbars width is equal to the current one,
>> then it resets width to the default size.
>>
>> The 'if' tests for arg != FRAME_CONFIG_SCROLL_BAR_WIDTH(f).
>> That is, if arg is equal to current width, the 'else' path is taken,
>> which resets to default.
>>
>> I suppose this should test for arg != "DEFAULT_WIDTH", but I don't know
>> where to find that.
> 
> Thanks.  I'd like to look into this, but it would help if I could
> reproduce the issue.
> 
>> Maybe you could not reproduce it because your scrollbars are on the
>> default size?
> 
> Maybe.  The OP didn't seem to say it was necessary to specify
> non-default scroll-bar width.
> 
> So what is the minimum recipe for reproducing the issue?

emacs -q

and eval this twice:

(set-frame-parameter nil 'scroll-bar-width 50)

The bar will change to 50 on first evaluation, and got back to default 
on second.