GNU bug report logs - #31795
26.1; Undecorated frame resize issues on macOS

Previous Next

Package: emacs;

Reported by: Boris Buliga <boris <at> d12frosted.io>

Date: Tue, 12 Jun 2018 07:56:03 UTC

Severity: minor

Merged with 28512

Found in versions 26.0.60, 26.1

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 31795 <at> debbugs.gnu.org (full text, mbox):

From: Boris Buliga <boris <at> d12frosted.io>
To: alan <at> idiocy.org
Cc: 31795 <at> debbugs.gnu.org
Subject: Re: bug#31795: 26.1; Undecorated frame resize issues on macOS
Date: Wed, 13 Jun 2018 07:09:33 +0300
[Message part 1 (text/plain, inline)]
Hey Alan,

Thank you for your reply!

> merge 31795 28512

Apparently, my search-fu has failed me as I didn't know about ticket 28512
before submitting new one. Thanks for linking.

That ticket actually reveals some insights on why the whole thing with
borderless mask doesn't behave as I want it to behave. As you say in your
message:

> Apparently macOS doesn’t like you changing the window style on the fly,
and
> resizing breaks.

As it turns out, you can achieve goal by creating a window without
NSWindowStyleMaskTitled regardless the undecorated flag value. It's not a
solution in general way, but in case someone is interested, I can share a
patch.

Though it would be nice to make it working with undecorated frame option.

> and switch to using NSFullSizeContentViewWindowMask and its relatives.

I should try this out.

> Hmm, this isn’t very good. Maybe we should be resetting the window style
> before and after toggling fullscreen.

Maybe. Because (let's say) it's not useful as is :)

> I would expect that to work.

OK, so I am not the only one :)

> Is the line break just because of your email client?

Exactly. Originally I've put it in one line.

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

> You don’t need this. IIRC EmacsFSWindow exists solely for non‐native
> fullscreen.

I was desperate.

On Tue, 12 Jun 2018 at 23:07, Alan Third <alan <at> idiocy.org> wrote:

> merge 31795 28512
> thank you
>
> On Mon, Jun 11, 2018 at 09:38:57PM +0300, Boris Buliga wrote:
> <create an undecorated frame>
> > 3. Try one of the following actions
> >
> > 3.1. M-x toggle-frame-fullsreen
> >
> >      Frames' window (in macOS sense) becomes fullscreen. But it doesn't
> >      cover all screen, instead it remains of the same default size with
> >      black area around.
>
> Hmm, this isn’t very good. Maybe we should be resetting the window
> style before and after toggling fullscreen.
>
> > 3.2. Use Spectacle.app (or similar application for resizing windows in
> >      macOS)
> >
> >      Frame is not resized.
>
> Unfortunately this is expected. Apparently macOS doesn’t like you
> changing the window style on the fly, and resizing breaks. The
> solution appears to be to recreate the NSWindow, or give up on
> NSWindowStyleMaskBorderless and switch to using
> NSFullSizeContentViewWindowMask and its relatives.
>
> > I've tried patching src/nsterm.m file by chaning definition of
> > FRAME_DECORATED_FLAGS from
> >
> >   #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless
> >
> > to
> >
> >   #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless |
> >    NSWindowStyleMaskResizable
>
> I would expect that to work. Is the line break just because of your
> email client? If not then you need to escape the newline like this:
>
>     #define FRAME_UNDECORATED_FLAGS NSWindowStyleMaskBorderless \
>                                     | NSWindowStyleMaskResizable
>
>
> > and creating EmacsFSWindow instead of EmacsWindow (so canBecomeKeyWindow
> > and canBecomeMainWindow both return YES).
>
> You don’t need this. IIRC EmacsFSWindow exists solely for non‐native
> fullscreen.
>
> --
> Alan Third
>


-- 
Cheers,
Boris
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 198 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.