unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Boris Buliga <boris@d12frosted.io>
To: help-gnu-emacs@gnu.org
Subject: [macOS] Toggle fullscreen on Emacs26.1+ with undecorated frame option set to t
Date: Thu, 7 Jun 2018 21:15:26 +0300	[thread overview]
Message-ID: <CAD5F_-BdNUKe1YADk7TxtmfOTcYSxm22cuxo=GwMqVpY+1himw@mail.gmail.com> (raw)

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


             reply	other threads:[~2018-06-07 18:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 18:15 Boris Buliga [this message]
2018-06-08  9:12 ` [macOS] Toggle fullscreen on Emacs26.1+ with undecorated frame option set to t 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD5F_-BdNUKe1YADk7TxtmfOTcYSxm22cuxo=GwMqVpY+1himw@mail.gmail.com' \
    --to=boris@d12frosted.io \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).