From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs 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) Message-ID: <20200301161605.GA8290@breton.holly.idiocy.org> References: <04CF7A6F-C1E7-4FE5-B648-8DA8CBD3B1ED@gmail.com> <20190716192822.GA63701@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="85718"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 36672@debbugs.gnu.org To: Andrii Kolomoiets Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 01 17:17:14 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j8RHF-000MCt-2v for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Mar 2020 17:17:13 +0100 Original-Received: from localhost ([::1]:49548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8RHE-0007jI-2X for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Mar 2020 11:17:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51043) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8RH5-0007j0-ST for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2020 11:17:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8RH4-0007F2-PN for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2020 11:17:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j8RH4-0007Es-He for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2020 11:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j8RH4-0006mW-EK for bug-gnu-emacs@gnu.org; Sun, 01 Mar 2020 11:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Mar 2020 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36672 X-GNU-PR-Package: emacs Original-Received: via spool by 36672-submit@debbugs.gnu.org id=B36672.158307937825996 (code B ref 36672); Sun, 01 Mar 2020 16:17:02 +0000 Original-Received: (at 36672) by debbugs.gnu.org; 1 Mar 2020 16:16:18 +0000 Original-Received: from localhost ([127.0.0.1]:36878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8RGM-0006lE-5d for submit@debbugs.gnu.org; Sun, 01 Mar 2020 11:16:18 -0500 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:40718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8RGK-0006l0-Lw for 36672@debbugs.gnu.org; Sun, 01 Mar 2020 11:16:17 -0500 Original-Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id 278251B21; Sun, 1 Mar 2020 17:16:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1583079370; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To; l=2830; bh=tVG9RgIbb/rVaVh7h2nBEdXw/dVLOtNp9l9E1inb22M=; b=mux5hCKHVybSlJV4vdzXNvnkXCiA1f0iYR29op9l5ndb2ghPYtHBygyxTdOs50nW TZPms8mLS3LmZH9nEBdg+Rh2B5+/vCl5nM6MnqQ9avM7ALNZ1eI7Q++etb1+57xLP64 hlUGbzHieea5beSKQ4/kugdm341tLMfVdauMqAX3JZ4nQ/6gZ19LjS6LCN0nKuogNVZ ssEC/t6UTHK+DkJYex4mUbR4NYMI5T1ptVAQeCgKr+DUsEMGeoLhZSzIk9jBqaa+xqa OeF6iZKBBAzQ2a4DuolDCMyvIU0Z4xmJu7SW9dp4hRg5chhW4T5NwSzmauySExhQE2Z xycsSxilVQ== Original-Received: by smtp.mailfence.com with ESMTPA ; Sun, 1 Mar 2020 17:16:06 +0100 (CET) Original-Received: by idiocy.org (Postfix, from userid 501) id 40AD8201FE1C4D; Sun, 1 Mar 2020 16:16:05 +0000 (GMT) Content-Disposition: inline In-Reply-To: X-ContactOffice-Account: com:241649512 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176726 Archived-At: On Fri, Feb 14, 2020 at 10:23:22AM +0200, Andrii Kolomoiets wrote: > Andrii Kolomoiets writes: > > >> On Jul 16, 2019, at 22:28, Alan Third 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