GNU bug report logs - #74435
Scrollbar width is not respected on Windows

Previous Next

Package: emacs;

Reported by: Johann Höchtl <johann.hoechtl <at> gmail.com>

Date: Tue, 19 Nov 2024 12:03:01 UTC

Severity: normal

Tags: fixed

Fixed in version 30.1

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74435 in the body.
You can then email your comments to 74435 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Tue, 19 Nov 2024 12:03:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johann Höchtl <johann.hoechtl <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 19 Nov 2024 12:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Johann Höchtl <johann.hoechtl <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Scrollbar width is not respected on Windows
Date: Tue, 19 Nov 2024 13:01:44 +0100
[Message part 1 (text/plain, inline)]
On Emacs Windows


It seems like the observation of
https://lists.libreplanet.org/archive/html/help-gnu-emacs/2023-11/msg00109.html
has never been reported as a bug.

This issue is real. When I spilt a Windows with C-x 3 and save the desktop
and re-open the desktop, the scrollbar separating the two windows is
broader than it used to be before saving.

When I manually open the .emacs.desktop file and delete the setq
scroll-bar-width and reload the desktop, the width is back to normal.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Thu, 21 Nov 2024 10:49:01 GMT) Full text and rfc822 format available.

Message #8 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Johann Höchtl <johann.hoechtl <at> gmail.com>,
 Cecilio Pardo <cpardo <at> imayhem.com>
Cc: 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Thu, 21 Nov 2024 12:48:13 +0200
> From: Johann Höchtl <johann.hoechtl <at> gmail.com>
> Date: Tue, 19 Nov 2024 13:01:44 +0100
> 
> On Emacs Windows
> 
> It seems like the observation of
> https://lists.libreplanet.org/archive/html/help-gnu-emacs/2023-11/msg00109.html
> has never been reported as a bug.

Because, as I responded there, I couldn't reproduce the problem.

> This issue is real. When I spilt a Windows with C-x 3 and save the desktop and re-open the desktop, the
> scrollbar separating the two windows is broader than it used to be before saving.

I still cannot reproduce this.  maybe this has something to do with
the display settings?  Like HiDPI, perhaps?

> When I manually open the .emacs.desktop file and delete the setq scroll-bar-width and reload the
> desktop, the width is back to normal.

What is the value of scroll-bar-width recorded in the desktop file,
and what does the below yield if you type it after "C-x 3" before
saving desktop?

  M-: (frame-parameter nil 'scroll-bar-width) RET

Adding Cecilio, in case he has an idea why this could happen, or can
suggest a way to debug this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Thu, 21 Nov 2024 14:58:01 GMT) Full text and rfc822 format available.

Message #11 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Johann Höchtl
 <johann.hoechtl <at> gmail.com>
Cc: 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Thu, 21 Nov 2024 15:57:14 +0100
On 21/11/2024 11:48, Eli Zaretskii wrote:
>> From: Johann Höchtl <johann.hoechtl <at> gmail.com>
>> Date: Tue, 19 Nov 2024 13:01:44 +0100
>>
>> On Emacs Windows
>>
>> It seems like the observation of
>> https://lists.libreplanet.org/archive/html/help-gnu-emacs/2023-11/msg00109.html
>> has never been reported as a bug.
> 
> Because, as I responded there, I couldn't reproduce the problem.
> 
>> This issue is real. When I spilt a Windows with C-x 3 and save the desktop and re-open the desktop, the
>> scrollbar separating the two windows is broader than it used to be before saving.
> 
> I still cannot reproduce this.  maybe this has something to do with
> the display settings?  Like HiDPI, perhaps?

I can reproduce this on Windows 11. I'm looking into it.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Thu, 21 Nov 2024 15:50:02 GMT) Full text and rfc822 format available.

Message #14 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Cecilio Pardo <cpardo <at> imayhem.com>
Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Thu, 21 Nov 2024 17:49:30 +0200
> Date: Thu, 21 Nov 2024 15:57:14 +0100
> Cc: 74435 <at> debbugs.gnu.org
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> 
> On 21/11/2024 11:48, Eli Zaretskii wrote:
> >> From: Johann Höchtl <johann.hoechtl <at> gmail.com>
> >> Date: Tue, 19 Nov 2024 13:01:44 +0100
> >>
> >> On Emacs Windows
> >>
> >> It seems like the observation of
> >> https://lists.libreplanet.org/archive/html/help-gnu-emacs/2023-11/msg00109.html
> >> has never been reported as a bug.
> > 
> > Because, as I responded there, I couldn't reproduce the problem.
> > 
> >> This issue is real. When I spilt a Windows with C-x 3 and save the desktop and re-open the desktop, the
> >> scrollbar separating the two windows is broader than it used to be before saving.
> > 
> > I still cannot reproduce this.  maybe this has something to do with
> > the display settings?  Like HiDPI, perhaps?
> 
> I can reproduce this on Windows 11. I'm looking into it.

Thanks, that's good news.  It would be interesting to know why I
couldn't reproduce that here (also Windows 11).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Thu, 21 Nov 2024 22:22:01 GMT) Full text and rfc822 format available.

Message #17 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Thu, 21 Nov 2024 23:21:05 +0100
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.

Maybe you could not reproduce it because your scrollbars are on the 
default size?






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Fri, 22 Nov 2024 06:54:02 GMT) Full text and rfc822 format available.

Message #20 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Cecilio Pardo <cpardo <at> imayhem.com>
Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Fri, 22 Nov 2024 08:53:34 +0200
> Date: Thu, 21 Nov 2024 23:21:05 +0100
> Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> 
> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Fri, 22 Nov 2024 07:46:01 GMT) Full text and rfc822 format available.

Message #23 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
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: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
>> From: Cecilio Pardo <cpardo <at> imayhem.com>
>>
>> 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.







Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Fri, 22 Nov 2024 10:14:02 GMT) Full text and rfc822 format available.

Message #26 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Cecilio Pardo <cpardo <at> imayhem.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Fri, 22 Nov 2024 11:13:24 +0100
[Message part 1 (text/plain, inline)]
> 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.

My bad.  Can you try the attached patch?

martin
[frame.c.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Fri, 22 Nov 2024 12:41:01 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Fri, 22 Nov 2024 13:39:55 +0100
On 22/11/2024 11:13, martin rudalics wrote:
>  > 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.
> 
> My bad.  Can you try the attached patch?
> 
> martin

Works for me, thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Thu, 28 Nov 2024 11:02:02 GMT) Full text and rfc822 format available.

Message #32 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Cecilio Pardo <cpardo <at> imayhem.com>
To: martin rudalics <rudalics <at> gmx.at>, Eli Zaretskii <eliz <at> gnu.org>
Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Thu, 28 Nov 2024 12:01:40 +0100
On 22/11/2024 11:13, martin rudalics:

>  > 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.
> 
> My bad.  Can you try the attached patch?

I think this bug can be fixed with Martin's change.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Thu, 28 Nov 2024 15:21:02 GMT) Full text and rfc822 format available.

Message #35 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rudalics <at> gmx.at, Cecilio Pardo <cpardo <at> imayhem.com>
Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Thu, 28 Nov 2024 17:20:32 +0200
> Date: Thu, 28 Nov 2024 12:01:40 +0100
> Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> 
> On 22/11/2024 11:13, martin rudalics:
> 
> >  > 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.
> > 
> > My bad.  Can you try the attached patch?
> 
> I think this bug can be fixed with Martin's change.

Martin, please install on the emacs-30 branch, and thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Thu, 28 Nov 2024 17:59:01 GMT) Full text and rfc822 format available.

Message #38 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>, Cecilio Pardo <cpardo <at> imayhem.com>
Cc: johann.hoechtl <at> gmail.com, 74435 <at> debbugs.gnu.org
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Thu, 28 Nov 2024 18:58:44 +0100
>> I think this bug can be fixed with Martin's change.
>
> Martin, please install on the emacs-30 branch, and thanks.

Installed.  Johann can you please check whether it fixes your problem?

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Fri, 06 Dec 2024 08:47:02 GMT) Full text and rfc822 format available.

Message #41 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: Johann Höchtl <johann.hoechtl <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 74435 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Cecilio Pardo <cpardo <at> imayhem.com>
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Fri, 6 Dec 2024 09:44:58 +0100
[Message part 1 (text/plain, inline)]
Am Do., 28. Nov. 2024 um 18:58 Uhr schrieb martin rudalics <rudalics <at> gmx.at
>:

>  >> I think this bug can be fixed with Martin's change.
>  >
>  > Martin, please install on the emacs-30 branch, and thanks.
>
> Installed.  Johann can you please check whether it fixes your problem?
>
>
Unfortunately I do not have the means to build Emacs myself. I tried
however the version='31.327.20241203.460f86c' from
https://github.com/kiennq/emacs-build/actions/runs/12136455311/job/33839381527
which to my understanding contains this commit. Using this build I have no
longer issues with broadening scroll bars.

Johann


> Thanks, martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74435; Package emacs. (Fri, 06 Dec 2024 09:09:02 GMT) Full text and rfc822 format available.

Message #44 received at 74435 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Johann Höchtl <johann.hoechtl <at> gmail.com>
Cc: 74435 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Cecilio Pardo <cpardo <at> imayhem.com>
Subject: Re: bug#74435: Scrollbar width is not respected on Windows
Date: Fri, 6 Dec 2024 10:08:37 +0100
tags 74435 fixed
close 74435 30.1
quit

> Unfortunately I do not have the means to build Emacs myself. I tried
> however the version='31.327.20241203.460f86c' from
> https://github.com/kiennq/emacs-build/actions/runs/12136455311/job/33839381527
> which to my understanding contains this commit. Using this build I have no
> longer issues with broadening scroll bars.

Thanks.  Marking this bug as done.

martin





Added tag(s) fixed. Request was from martin rudalics <rudalics <at> gmx.at> to control <at> debbugs.gnu.org. (Fri, 06 Dec 2024 09:09:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 30.1, send any further explanations to 74435 <at> debbugs.gnu.org and Johann Höchtl <johann.hoechtl <at> gmail.com> Request was from martin rudalics <rudalics <at> gmx.at> to control <at> debbugs.gnu.org. (Fri, 06 Dec 2024 09:09:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 03 Jan 2025 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.