GNU bug report logs - #25
frame parameter menu-bar-lines changes height of frame

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 29 Feb 2008 09:15:04 UTC

Severity: wishlist

Merged with 14795

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 25 in the body.
You can then email your comments to 25 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#25; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "Bug-Gnu-Emacs" <bug-gnu-emacs <at> gnu.org>
Subject: frame parameter menu-bar-lines changes height of frame
Date: Mon, 23 Jul 2007 21:28:54 -0700
Can we please revisit this now that the release is out?

> From: Drew Adams Sent: Saturday, June 10, 2006 8:57 AM
> To: Emacs-Pretest-Bug
> Subject: frame parameter menu-bar-lines changes height of frame
>
> emacs -Q
>
> (make-frame '((width . 70)(height . 50)))
> (modify-frame-parameters (selected-frame) '((menu-bar-lines . 0)))
> (frame-parameters)
> (modify-frame-parameters (selected-frame) '((menu-bar-lines . 1)))
> (frame-parameters)
>
> Adding and removing a menu-bar line changes the visible height of the
> frame (incorrect), but it does not change the `height' frame
> parameter. The correct behavior is that observed for `tool-bar-lines':
> neither the visible frame height nor the `height' parameter is
> changed.

Use (assq 'height (frame-parameters)) to see that the `height'
parameter does not change.

This was first reported 2.5 years ago. Here is the last bit
of discussion about it:

> From: Drew Adams Sent: Tuesday, June 13, 2006 11:59 AM
> Hi Eli,
> Thanks for your explanation. I understand better now.
>
> I'm fine with this not being fixed before the release. I would
> ask that it be fixed soon thereafter, if possible.
>
> If necessary, we can reopen the discussion of what the behavior
> should be. To me, it should be like the tool-bar behavior. If
> that's not possible in some contexts, then those contexts can be
> treated specially (do the best we can to determine menu-bar height etc.).
>
> Showing and hiding the menu-bar should not change the frame size
> whenever that is avoidable. There is no reason to reduce
> everything to the lowest common denominator, if that denominator
> is bugged behavior. If the bugged behavior is sometimes
> unavoidable, so be it, but let's not use it as the norm.
>
> Thx - Drew
>
> -----------------
>
>     > You've said that the reason to not fix this now or soon is
>     that fixing it
>     > would be difficult. Could you explain why menu-bar-lines is
>     different from
>     > tool-bar-lines in this respect?
>
>     Because, historically, the menu bar was just a line of text at the
>     upper edge of the frame (and still is, in the non-toolkit and tty
>     builds).  Tool bar was never an integral number of text lines.
>
>     > The latter works correctly. Couldn't the tool-bar-lines
>     > implementation (fix) apply also to menu-bar-lines?
>
>     Theoretically, yes.  But even the thread you cited (which started
>     about a different issue, and only touched the menu bar tangentially)
>     reveals that people are divided on what should be the right behavior.
>     There are also other complications, IIRC: the size of the menu bar may
>     not be known with some toolkits, so resizing the text area might be
>     tricky.
>
>     That is why I don't think we should try to fix this now.  The fact
>     that two years have passed (actually much more, since this issue was
>     discussed back when Gerd Moellmann was the head maintainer) is
>     unfortunate, but I think we will shoot in our foot if we add now as
>     yet additional complication in the display-related code.  I fear the
>     redisplay-dont-pause changes already complicated things enough, and
>     might prolong the pretest.  Emacs had this misfeature for a long time,
>     and complaints, if there were any, were minimal.  I think the fix can
>     wait a little longer.


In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'




_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs <at> gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#25; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 25 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 25 <at> debbugs.gnu.org
Subject: Re: frame parameter menu-bar-lines changes height of frame
Date: Tue, 10 Jun 2008 15:06:41 -0400
severity 25 wishlist
thanks

The menu-bar currently isn't counted as part of the "text area" (whose
size is described by the height and width frame parameters), whereas the
tool-bar is.

I agree that the way the toolbar behaves in this respect is preferable,
but because Emacs still counts sizes in multiple of lines and columns,
it also has drawbacks (typically a few pixels wasted between the
tool-bar and the actual text).

Hopefully, we'll fix this at some point.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#25; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #15 received at 25 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>,
        <25 <at> debbugs.gnu.org>
Subject: RE: bug#25: frame parameter menu-bar-lines changes height of frame
Date: Tue, 10 Jun 2008 12:42:09 -0700
Too bad. Apparently people have been agreeing that this should be fixed since it
was first discussed when Gerd was in charge - years.

Previously, the reason given for not fixing it at the time was that the release
was imminent and we didn't want to risk the change.

Now, this has simply been downgraded to "wishlist" - poof!  Dommage.

> From: Stefan Monnier Sent: Tuesday, June 10, 2008 12:07 PM
> severity 25 wishlist
> thanks
> 
> The menu-bar currently isn't counted as part of the "text area" (whose
> size is described by the height and width frame parameters), 
> whereas the tool-bar is.
> 
> I agree that the way the toolbar behaves in this respect is 
> preferable,
> but because Emacs still counts sizes in multiple of lines and columns,
> it also has drawbacks (typically a few pixels wasted between the
> tool-bar and the actual text).
> 
> Hopefully, we'll fix this at some point.





Severity set to `wishlist' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 01 Jul 2008 07:15:03 GMT) Full text and rfc822 format available.

Forcibly Merged 25 14795. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 05 Jul 2013 19:50:02 GMT) Full text and rfc822 format available.

Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. (Wed, 31 Dec 2014 18:37:03 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Wed, 31 Dec 2014 18:37:03 GMT) Full text and rfc822 format available.

Message #24 received at 25-done <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: drew.adams <at> oracle.com, 25-done <at> debbugs.gnu.org
Subject: Re: frame parameter menu-bar-lines changes height of frame
Date: Wed, 31 Dec 2014 19:36:36 +0100
> > emacs -Q
> >
> > (make-frame '((width . 70)(height . 50)))
> > (modify-frame-parameters (selected-frame) '((menu-bar-lines . 0)))
> > (frame-parameters)
> > (modify-frame-parameters (selected-frame) '((menu-bar-lines . 1)))
> > (frame-parameters)
> >
> > Adding and removing a menu-bar line changes the visible height of the
> > frame (incorrect), but it does not change the `height' frame
> > parameter. The correct behavior is that observed for `tool-bar-lines':
> > neither the visible frame height nor the `height' parameter is
> > changed.
>
> Use (assq 'height (frame-parameters)) to see that the `height'
> parameter does not change.

This can now be handled on trunk/master by adding 'menu-bar-lines' to
`frame-inhibit-implied-resize'.  Bug closed.

Thanks, martin




Reply sent to martin rudalics <rudalics <at> gmx.at>:
You have taken responsibility. (Wed, 31 Dec 2014 18:37:04 GMT) Full text and rfc822 format available.

Notification sent to Juanma Barranquero <lekktu <at> gmail.com>:
bug acknowledged by developer. (Wed, 31 Dec 2014 18:37:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25; Package emacs. (Wed, 31 Dec 2014 18:54:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: martin rudalics <rudalics <at> gmx.at>, 25-done <at> debbugs.gnu.org
Subject: RE: frame parameter menu-bar-lines changes height of frame
Date: Wed, 31 Dec 2014 10:53:33 -0800 (PST)
> This can now be handled on trunk/master by adding 'menu-bar-lines'
> to `frame-inhibit-implied-resize'.  Bug closed.

I don't have a version with the fix yet.  (I have been unable to use
any Emacs versions since mid-October because they break the use of
frames in various ways, but I will look into those problems and report
them as I narrow things down.)

I gather that `frame-inhibit-implied-resize' is a user option.  It's
great that users can now control the behavior, but I wonder how that
helps code and how it fixes the bug reported here.  The point of
this bug was that `menu-bar-lines' should behave like `tool-bar-lines'
does: adding or removing a menu bar, or increasing/decreasing the
number of its lines, should not change the visible frame height.

If that behavior is only optional, and decided by users, then it
sounds like things are not the same as for `tool-bar-lines' and
that code cannot depend on the behavior being the same.

Anyway, I won't judge the fix until I can check it out.  And my
guess is that it is an improvement.  Thanks for working on this,
in any case.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25; Package emacs. (Thu, 01 Jan 2015 10:26:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Drew Adams <drew.adams <at> oracle.com>, 25-done <at> debbugs.gnu.org
Subject: Re: frame parameter menu-bar-lines changes height of frame
Date: Thu, 01 Jan 2015 11:25:24 +0100
> I gather that `frame-inhibit-implied-resize' is a user option.  It's
> great that users can now control the behavior, but I wonder how that
> helps code and how it fixes the bug reported here.

Please refrain from calling this a bug.  It's a behavior you dislike and
we can try to modify it in your sense.  But let's do that in a minimally
invasive fashion so other users don't get annoyed by our modifications.

> The point of
> this bug was that `menu-bar-lines' should behave like `tool-bar-lines'
> does: adding or removing a menu bar, or increasing/decreasing the
> number of its lines, should not change the visible frame height.

For graphical displays now the following hold:

If a user adds both `menu-bar-lines' and `tool-bar-lines' to
`frame-inhibit-implied-resize' or the latter is t or the frame is either
maximized or fullscreen, then toggling either `menu-bar-mode' or
`tool-bar-mode' conceptually do not change the visible frame height.

If neither `menu-bar-lines' and `tool-bar-lines' are members of
`frame-inhibit-implied-resize' and the latter is not t and the frame is
neither maximized nor fullscreen, then toggling either `menu-bar-mode'
or `tool-bar-mode' conceptually do change the visible frame height.

And this holds for Gtk just as for Windows.

> If that behavior is only optional, and decided by users, then it
> sounds like things are not the same as for `tool-bar-lines' and
> that code cannot depend on the behavior being the same.

Code can always read the value of `frame-inhibit-implied-resize' as well
as the maximized/fullscreen status of a frame.

martin




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

This bug report was last modified 10 years and 141 days ago.

Previous Next


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