From: Boris Buliga <boris@d12frosted.io>
To: alan@idiocy.org
Cc: 31795@debbugs.gnu.org
Subject: bug#31795: 26.1; Undecorated frame resize issues on macOS
Date: Wed, 13 Jun 2018 07:09:33 +0300 [thread overview]
Message-ID: <CAD5F_-DYCUn9+brk0n7EVDLf_Bk4oTCyt3jSuyePoq+AM+NLaw@mail.gmail.com> (raw)
In-Reply-To: <20180612200748.GB889@breton.holly.idiocy.org>
[-- Attachment #1: Type: text/plain, Size: 3349 bytes --]
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@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
[-- Attachment #2: Type: text/html, Size: 4545 bytes --]
prev parent reply other threads:[~2018-06-13 4:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-11 18:38 bug#31795: 26.1; Undecorated frame resize issues on macOS Boris Buliga
2018-06-12 20:07 ` Alan Third
2018-06-13 4:09 ` Boris Buliga [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAD5F_-DYCUn9+brk0n7EVDLf_Bk4oTCyt3jSuyePoq+AM+NLaw@mail.gmail.com \
--to=boris@d12frosted.io \
--cc=31795@debbugs.gnu.org \
--cc=alan@idiocy.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.