GNU bug report logs - #19075
`toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows

Previous Next

Package: emacs;

Reported by: Alexander Shukaev <haroogan <at> gmail.com>

Date: Mon, 17 Nov 2014 08:15:03 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Alexander Shukaev <haroogan <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: `toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows
Date: Mon, 17 Nov 2014 09:13:56 +0100
[Message part 1 (text/plain, inline)]
`init.el':

(add-hook 'window-setup-hook 'toggle-frame-maximized t)
(add-hook 'window-setup-hook 'toggle-frame-fullscreen t)

does not work as expected. Emacs goes fullscreen indeed. However, running
manually `(toggle-frame-fullscreen)' once again after Emacs loaded, does
not bring Emacs into maximized state, it rather returns to a small initial
frame (of the default size, `emacs -q' to remind yourself how it looks
like). Changing `init.el' to:

(add-to-list 'default-frame-alist '(fullscreen . maximized))
(add-hook 'window-setup-hook 'toggle-frame-fullscreen t)

does not help either.

One could think that somehow `maximized' parameter is not set, but if one
has in `init.el' only:

(add-to-list 'default-frame-alist '(fullscreen . maximized))

or

(add-hook 'window-setup-hook 'toggle-frame-maximized t)

then Emacs is loaded into maximized state indeed (*).

On the other hand in `emacs -q', if one runs

(toggle-frame-maximized)
(toggle-frame-fullscreen)

manually, and then runs `(toggle-frame-fullscreen)' manually once again,
then Emacs is brought to maximized state.

All this makes me think that there is some problem with memorizing
`maximized' parameter during `window-setup-hook', but note that this
actually contradicts (*) what makes this problem even more confusing.

It's Emacs 24.4.50 on Windows.
[Message part 2 (text/html, inline)]

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

Previous Next


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