unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Scrollbar width not respected in restored frames
@ 2023-11-20 10:46 PierGianLuca
  2023-11-20 12:34 ` Eli Zaretskii
  2023-11-20 15:17 ` [External] : " Drew Adams
  0 siblings, 2 replies; 3+ messages in thread
From: PierGianLuca @ 2023-11-20 10:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hi everyone,

I'm on Ubuntu 20.04, KDE Plasma X11. Emacs 29.1 from tarball.

I consistently see a discrepancy between the vertical-scrollbar width of the initial frames, restored from a previous session, and of subsequent frames called with make-frame-command (C-x52).

Here is an example, I'd like to know whether others see this behaviour too:

1. Make sure Desktop-save-mode is on

2. Select any geometry you like in default-frame-alist and specify scroll-bar-width with some value (in my case it's "21")

3. Create a new frame with "C-x 5 2".

4. Check that the vertical scrollbar respects the width specified in default-frame-alist. If you like, check the window geometry with some tool like "xwininfo".

5. Close all other frames, make sure the one you created in step 3. is the only one left.

6. Quit the Emacs session

7. Start Emacs. You should see the frame from the previous session.

8. Check the width of the vertical scrollbar in this frame. You should see it's different from the one right before you quit Emacs. This should be confirmed by "xwininfo" or similar tool.

9. Create a new frame with "C-x 5 2". You should see that the new frame respects the scrollbar width of "default-frame-alist" (and it's different from the one of the first, initially restored frame).


May this be a bug in desktop-save-mode?

Here are some additional details:

• If the frame width is changed *manually* (for instance first enlarge then bring to original size) then the correct width is restored upon restarting Emacs


• The erroneous scrollbar width that Emacs presents when restoring windows seems to be the default one


• Specifying the width in "early-init.el" with

(add-to-list 'default-frame-alist '(scroll-bar-width . 21))

has no effect. Same if initial-frame-alist is used instead/in addition


• Specifying

(setq frame-resize-pixelwise t)

either in init.el or early-init.el doesn't solve this.


• I see this behaviour both when configuring Emacs with "--with-x-toolkit=lucid" and with "--with-x-toolkit=gtk", and both with or without "--without-toolkit-scroll-bars".


•  My windows manager (KWin) has an explicit rule to respect any geometry that Emacs asks. I made sure of this: I can resize the Emacs windows as I please, and their geometries are respected upon restarting.


Cheers,
Luca



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Scrollbar width not respected in restored frames
  2023-11-20 10:46 Scrollbar width not respected in restored frames PierGianLuca
@ 2023-11-20 12:34 ` Eli Zaretskii
  2023-11-20 15:17 ` [External] : " Drew Adams
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2023-11-20 12:34 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Mon, 20 Nov 2023 11:46:37 +0100
> From: PierGianLuca <luca@magnaspesmeretrix.org>
> 
> Hi everyone,
> 
> I'm on Ubuntu 20.04, KDE Plasma X11. Emacs 29.1 from tarball.
> 
> I consistently see a discrepancy between the vertical-scrollbar width of the initial frames, restored from a previous session, and of subsequent frames called with make-frame-command (C-x52).
> 
> Here is an example, I'd like to know whether others see this behaviour too:
> 
> 1. Make sure Desktop-save-mode is on
> 
> 2. Select any geometry you like in default-frame-alist and specify scroll-bar-width with some value (in my case it's "21")
> 
> 3. Create a new frame with "C-x 5 2".
> 
> 4. Check that the vertical scrollbar respects the width specified in default-frame-alist. If you like, check the window geometry with some tool like "xwininfo".
> 
> 5. Close all other frames, make sure the one you created in step 3. is the only one left.
> 
> 6. Quit the Emacs session
> 
> 7. Start Emacs. You should see the frame from the previous session.
> 
> 8. Check the width of the vertical scrollbar in this frame. You should see it's different from the one right before you quit Emacs. This should be confirmed by "xwininfo" or similar tool.
> 
> 9. Create a new frame with "C-x 5 2". You should see that the new frame respects the scrollbar width of "default-frame-alist" (and it's different from the one of the first, initially restored frame).
> 
> 
> May this be a bug in desktop-save-mode?

I cannot reproduce this.  Look in the .emacs.desktop file created by
desktop.el: if it specifies the scroll-bar-width value you set, then
it should be restored (it is here).  If that doesn't work for you,
maybe it's something related to your window-manager or system-wider
settings that override what desktop.el tries to restore.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [External] : Scrollbar width not respected in restored frames
  2023-11-20 10:46 Scrollbar width not respected in restored frames PierGianLuca
  2023-11-20 12:34 ` Eli Zaretskii
@ 2023-11-20 15:17 ` Drew Adams
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2023-11-20 15:17 UTC (permalink / raw)
  To: PierGianLuca, help-gnu-emacs@gnu.org

> I consistently see a discrepancy between the vertical-scrollbar width of
> the initial frames, restored from a previous session, and of subsequent
> frames called with make-frame-command (C-x52).

Dunno whether this is related, but I see something
similar (?), starting with Emacs 27, wrt applying
saved frame parameters - on MS Windows.

With my library `thumb-frm.el', I can optionally
thumbify instead of iconify frames.  I.e., shrink
frames to a thumbnail size.  This shrinks
everything, including the vertical scroll bar.

But starting with Emacs 27 the vertical scroll
bar isn't shrunk - it has the width of a default
frame.

More precisely, the first time I thumbify a frame 
the scroll bar shrinks as it should.  But if I
restore that frame and then shrink it again the
thumbnail frame has the (wide) default-size scroll
bar.  From then on that frame is always wide when
thumbified.

Same with any other frame: first time thumbified
the scroll bar is shrunk, as it should be, but
thereafter it has the default-frame width.

Maybe not related to what you're seeing, as I'm
on Windows and you're not.  Dunno.
___

https://www.emacswiki.org/emacs/FisheyeWithThumbs

https://www.emacswiki.org/emacs/download/thumb-frm.el


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-20 15:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 10:46 Scrollbar width not respected in restored frames PierGianLuca
2023-11-20 12:34 ` Eli Zaretskii
2023-11-20 15:17 ` [External] : " Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).