unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [macOS] Toggle fullscreen on Emacs26.1+ with undecorated frame option set to t
@ 2018-06-07 18:15 Boris Buliga
  2018-06-08  9:12 ` Robert Pluim
  0 siblings, 1 reply; 9+ messages in thread
From: Boris Buliga @ 2018-06-07 18:15 UTC (permalink / raw)
  To: help-gnu-emacs

Hey folks,

With the release of Emacs 26.1 there is an option to create undecorated
frames
(without title, toolbar etc). This is possible by adding following code to
your
init.el file:

  (add-to-list 'default-frame-alist '(undecorated . t))

Or, for testing purposes, you can run it by starting emacs with as follows:

  $ emacs -q --execute "(add-to-list 'default-frame-alist '(undecorated .
t))"

After that, if you call toggle-frame-fullscreen, Emacs goes to native
fullscreen
mode and instead of resizing the frame to cover all screen it stays the same
size as before toggling fullscreen, but with black space around.

The other thing, if you are using applications like Spectacle (for quickly
moving/resizing windows in macOS) or tile managers, then the Emacs frame is
moved, but doesn't change the size.

Does anyone know how to fix it?

I've checked the implementation in src/nsterm.m file and tried modifying
definition of FRAME_DECORATED_FLAGS from

  #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless

to

  #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless |
NSWindowStyleMaskResizable

and creating EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWindow and
canBecomeMainWindow both return YES).

But it didn't make the trick. It seems that my C/Objective-C -fu is not
enough,
so I ask for help.

Just to make it clear, I've tried to test this using emacs provided by

  $ brew cask install emacs

Version in 26.1

Would be glad for any advice/help.

Cheers,
Boris


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-08 23:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-07 18:15 [macOS] Toggle fullscreen on Emacs26.1+ with undecorated frame option set to t Boris Buliga
2018-06-08  9:12 ` Robert Pluim
2018-06-08  9:55   ` Van L
2018-06-08  9:59     ` Boris Buliga
2018-06-08 10:04       ` Van L
2018-06-08 11:51         ` Boris Buliga
2018-06-08 23:40           ` Van L
     [not found]         ` <mailman.1481.1528458730.1292.help-gnu-emacs@gnu.org>
2018-06-08 14:08           ` Javier
2018-06-08 14:33             ` Robert Pluim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).