Subject: bug#57758: closed (Re: bug#57758: Using menu-bar-mode and tool-bar-mode changes frame size)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 13 Sep 2022 04:58:02 +0000

Your bug report

#57758: Using menu-bar-mode and tool-bar-mode changes frame size

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
57758: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57758
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#57758: Using menu-bar-mode and tool-bar-mode changes frame size
From: Po Lu <[email-masked]>
To: uzibalqa <[email-masked]>
Cc: [email-masked]
Date: Tue, 13 Sep 2022 12:56:45 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

uzibalqa <[email-masked]> writes:

> It makes more sense to change the size of the window instead of the frame.

If you want that, turn on frame-inhibit-implied resize.  The default
behavior will not change.

> Particularly for people having multiple screens of different sizes.  The frame 
> resize poses the problem of having the frame get beyond the screen region,
> with no way to access the menu-bar. 

Assuming you mean "monitor" by "screen", you can just move the frame
back inside.  But the implicit resizing is more likely to cut off the
echo area than the menu bar, since the origin of the frame wrt the root
window remains unchanged.

Subject: Using menu-bar-mode and tool-bar-mode changes frame size
From: uzibalqa <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 12 Sep 2022 21:45:56 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

I have noticed that calling repeatedly  "frame-fullscreen"  followed by  "frame-normal"  changes
the size of the frame.  The problem happens when calling "menu-bar-mode" and "tool-bar-mode".

Having only (toggle-frame-fullscreen) keep the frame size intact.

--------

(defun frame-fullscreen ()

  (interactive)

  (toggle-frame-fullscreen) (menu-bar-mode -1) (tool-bar-mode -1))

--------

(defun frame-normal ()

  (interactive)

  (menu-bar-mode 1) (tool-bar-mode 1) (toggle-frame-fullscreen))