From: Alan Third <alan@idiocy.org>
To: Andrii Kolomoiets <andreyk.mad@gmail.com>
Cc: 36672@debbugs.gnu.org
Subject: bug#36672: 27.0.50; NS build: Creating child frame leads to empty space
Date: Sun, 1 Mar 2020 17:16:08 +0100 (CET) [thread overview]
Message-ID: <20200301161605.GA8290@breton.holly.idiocy.org> (raw)
In-Reply-To: <m2eeuxy3ut.fsf@10-1-1-147.office.area>
On Fri, Feb 14, 2020 at 10:23:22AM +0200, Andrii Kolomoiets wrote:
> Andrii Kolomoiets <andreyk.mad@gmail.com> writes:
>
> >> On Jul 16, 2019, at 22:28, Alan Third <alan@idiocy.org> wrote:
> >>
> >> The patch looks good to me, but lets see if we can find solutions to
> >> these other issues.
> >
> > I made some progress on this issue.
> >
> > The idea is to wait for fullscreen transition to complete:
> > - Set property isFullScreenTransition on windowWillEnterFullScreen and
> > windowWillExitFullScreen events;
> > - Clear that property on windowDidEnterFullScreen and
> > windowDidExitFullScreen events;
> > - Wait for property to be cleared when we need to.
>
> Updated patch to work with latest master
Thanks! This looks much better than what we had before. No crashes for
one!
A few nitpicks:
> + BOOL is_fullscreen_transition;
I may be misunderstanding this, but would ‘in_fullscreen_transition’
be a better name?
> +#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
> + // child frame must not be in fullscreen
> + if ([view fsIsNative] && [view isFullscreen]){
Opening braces go on a new line.
> +- (void)waitFullScreenTransition
> +{
> +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
> + while ([self isFullScreenTransition]){
Opening brace, again.
> - (BOOL)fsIsNative
> {
> return fs_is_native;
> @@ -7904,10 +7963,17 @@ - (void)updateCollectionBehavior
> {
> NSWindow *win = [self window];
> NSWindowCollectionBehavior b = [win collectionBehavior];
> - if (ns_use_native_fullscreen)
> - b |= NSWindowCollectionBehaviorFullScreenPrimary;
> - else
> + if (ns_use_native_fullscreen) {
> + if ([win parentWindow]) {
> + b &= ~NSWindowCollectionBehaviorFullScreenPrimary;
> + b |= NSWindowCollectionBehaviorFullScreenAuxiliary;
> + } else {
> + b |= NSWindowCollectionBehaviorFullScreenPrimary;
> + b &= ~NSWindowCollectionBehaviorFullScreenAuxiliary;
> + }
> + } else {
> b &= ~NSWindowCollectionBehaviorFullScreenPrimary;
> + }
And again. That ‘} else {’ should also be over three lines.
> #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
> @@ -7932,9 +7998,14 @@ - (void)toggleFullScreen: (id)sender
> {
> #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
> #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
> - if ([[self window] respondsToSelector: @selector(toggleFullScreen:)])
> + if ([[self window] respondsToSelector: @selector(toggleFullScreen:)]){
> #endif
> [[self window] toggleFullScreen:sender];
> + // wait for fullscreen animation complete (bug#28496)
> + [self waitFullScreenTransition];
> +#endif
> +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
> + }
> #endif
> return;
> }
Should that final #if #endif not be within the outer #if #endif? And
the opening brace again.
--
Alan Third
next prev parent reply other threads:[~2020-03-01 16:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 17:38 bug#36672: 27.0.50; NS build: Creating child frame leads to empty space Andrii Kolomoiets
2019-07-16 19:28 ` Alan Third
2019-07-17 8:39 ` martin rudalics
2019-07-17 18:51 ` Andrii Kolomoiets
2019-07-23 18:14 ` Andrii Kolomoiets
2020-02-14 8:23 ` Andrii Kolomoiets
2020-02-20 23:23 ` Alan Third
2020-03-01 16:16 ` Alan Third [this message]
2020-03-10 8:42 ` Andrii Kolomoiets
2020-03-12 23:27 ` Alan Third
2020-03-13 9:38 ` martin rudalics
2020-03-13 15:13 ` Alan Third
2020-03-13 16:29 ` martin rudalics
2020-03-13 17:45 ` martin rudalics
2020-03-13 23:53 ` Alan Third
2020-03-14 8:48 ` martin rudalics
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=20200301161605.GA8290@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=36672@debbugs.gnu.org \
--cc=andreyk.mad@gmail.com \
/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.