Subject: Re: bug#21415: 25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame

From: martin rudalics <[email-masked]>
Date: Tue, 22 Sep 2015 08:38:27 +0200

> In OS X Yosemite, the "maximize" button (the green round button on the top
 > left of the screen) starts fullscreen mode.

This is what ‘toggle-frame-fullscreen’ is supposed to do.

 > `toggle-frame-maximized', on the other hand, tries to resize the frame so
 > that it covers an entire monitor, but without entering full-screen mode
 > (which is the way it should work).

What if the next OS X generation changes policy again and asks for some
sort of "fullboth"?

 > Unfortunately, there is a bit of empty
 > space above and below the Emacs frame. It looks like this is due to the
 > fact that there isn't enough space to create another full line of text.
 > When setting `frame-resize-pixelwise' to t, unfortunately, it still doesn't
 > cover the entire display, and the behaviour is a bit more random, with the
 > frame repositioning itself slightly differently when
 > `toggle-frame-maximized' is called multiple times.

We'd have to fix this one way or the other.  Maybe by temporarily
collating "fullscreen" and "fullboth" for the NS builds.

The important thing is to synchronize the value of the ‘fullscreen’
frame parameter with the actual state of the frame as seen by both, the
window manager (or the OS) and the user.  The state of the frame
includes its size, its decorations and the state of the "maximize"
button.  In my experience, having ‘toggle-frame-maximized’ follow
‘toggle-frame-fullscreen’ can be very tricky in this regard.

 > I didn't manage to make it fill both my monitors, only one. (How does the
 > command work on other systems?)

I can't tell because I use only one monitor.

 > The documentation refers to an undefined
 > variable, x-frame-normalize-before-maximize.

This variable is for X only.  I'll fix that in the documentation.

martin