help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[macOS] Toggle fullscreen on Emacs26.1+ with undecorated frame option se


From: Boris Buliga
Subject: [macOS] Toggle fullscreen on Emacs26.1+ with undecorated frame option set to t
Date: Thu, 7 Jun 2018 21:15:26 +0300

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 via email to

[Prev in Thread] Current Thread [Next in Thread]