GNU bug report logs -
#19075
`toggle-frame-maximized' and `toggle-frame-fullscreen' on Windows
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[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.