emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposing changes to adjust_frame_size


From: Tassilo Horn
Subject: Re: Proposing changes to adjust_frame_size
Date: Wed, 12 May 2021 21:06:44 +0200
User-agent: mu4e 1.5.13; emacs 28.0.50

martin rudalics <rudalics@gmx.at> writes:

>> I can when my emacs frame is floating.  If it is tiling, nothing changes
>> (which is expected).  But if I make it floating afterwards, it'll have
>> the height/width as specified by the frame parameters.
>>
>>> Does your frame resize when you toggle the vertical scroll bar
>>> on/off?
>>
>> Again, yes when floating, no when tiling.
>
> Is everything redisplayed as expected in the tiled case when you do
> either of that?

Yes, I think so.

> For example, try to turn off vertical scroll bar -> put it on the left
> -> turn it off again -> put it back on the right.

Yes, looks all right with emacs -Q.  But with my normal config which
includes (scroll-bar-mode -1), when I do `C-x 5 2' the new frame has a
scrollbar on the right which won't vanish when resizing or switching
focus.  That happens with a freshly started emacs reproducibly but not
with the longer running instance I'm writing this mail in.

I'll see if I can reduce my config to the essentials triggering this
behavior...

... Oh, that was easier as expected.

--8<---------------cut here---------------start------------->8---
(tool-bar-mode -1)
(menu-bar-mode -1)
(when (fboundp 'scroll-bar-mode)
  (scroll-bar-mode -1))
(when (fboundp 'horizontal-scroll-bar-mode)
  (horizontal-scroll-bar-mode -1))

(setq default-frame-alist '((width . 90)
                            (height . 50)))
--8<---------------cut here---------------end--------------->8---

With "emacs -Q --load repro.el" where repro.el contains just the above
listing, I get an initial frame with the usual annoyance (a menubar
which vanishes on focus/resize), and in addition C-x 5 2 gives me a new
frame which has a scrollbar which won't vanish except by M-x
scroll-bar-mode RET twice.  (The first makes the scrollbars appear also
on the initial frame, the second turns it off in both frames).

>>> I've pushed it now.  It should fail in the usual manner with
>>>
>>> (setq frame (make-frame '((visibility . nil) (width . 80))))
>>> (make-frame-visible frame)
>>>
>>> Please verify.
>>
>> I'm happy not to disappoint you. ;-)
>
> OK.  So people who do that on a tiling WM will be punished.

It's not a hard punishment, and I guess tiling WM users usually won't
specify a width anyway, so the issue is present at most when some
package does that.  (Without width, it works just fine.)

Also interestingly, with just emacs -Q, C-x 5 2 exhibits the "toolbar is
missing in the new frame" issue.  When I load the repro.el from above
before C-x 5 2, the new frame has no toolbar or menubar but the
scrollbar is there in the new frame.

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]