From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#48406: 28.0.50; Emacs stuck in infinite loop in wait_reading_process_output when opening in fullscreen (NS) Date: Sat, 5 Jun 2021 14:45:38 +0100 Message-ID: References: <5E1B46C6-1359-4CCF-B4EF-5527FB915F93@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="hrn4dSw63p0mHlce" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36656"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Illia Ostapyshyn , 48406@debbugs.gnu.org To: Andrii Kolomoiets Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 05 15:46:20 2021 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 1lpWd1-0009FZ-SS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Jun 2021 15:46:19 +0200 Original-Received: from localhost ([::1]:41834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpWcz-0005aR-Sn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Jun 2021 09:46:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpWck-0005aF-OD for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 09:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpWck-0002GE-HT for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 09:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpWck-0004MV-Bm for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 09:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Jun 2021 13:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48406 X-GNU-PR-Package: emacs Original-Received: via spool by 48406-submit@debbugs.gnu.org id=B48406.162290074916746 (code B ref 48406); Sat, 05 Jun 2021 13:46:02 +0000 Original-Received: (at 48406) by debbugs.gnu.org; 5 Jun 2021 13:45:49 +0000 Original-Received: from localhost ([127.0.0.1]:48503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpWcW-0004M2-W6 for submit@debbugs.gnu.org; Sat, 05 Jun 2021 09:45:49 -0400 Original-Received: from [217.169.17.33] (port=49919 helo=breton.holly.idiocy.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpWcU-0004Lm-3t for 48406@debbugs.gnu.org; Sat, 05 Jun 2021 09:45:47 -0400 Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 94C14202C51333; Sat, 5 Jun 2021 14:45:38 +0100 (BST) Mail-Followup-To: Alan Third , Andrii Kolomoiets , Illia Ostapyshyn , 48406@debbugs.gnu.org Content-Disposition: inline In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:208054 Archived-At: --hrn4dSw63p0mHlce Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Patch attached. I think this is probably pretty safe, but I'll leave it a couple of days in case someone finds a problem with it. -- Alan Third --hrn4dSw63p0mHlce Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Remove-pause-on-fullscreening-in-NS-bug-48406.patch" >From 237ad27c3164483cc3c0a9c870db2653456f076c Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sat, 5 Jun 2021 14:38:17 +0100 Subject: [PATCH] Remove pause on fullscreening in NS (bug#48406) * src/nsterm.m (ns_make_frame_visible): (ns_set_parent_frame): ([EmacsView toggleFullScreen:]): Remove calls to removed methods.. ([EmacsView inFullScreenTransition]): ([EmacsView waitFullScreenTransition]): Remove methods. * src/nsterm.h (EmacsView): Remove defintions of removed methods, and the in_fullscreen_transition variable. --- src/nsterm.h | 3 --- src/nsterm.m | 32 ++------------------------------ 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/src/nsterm.h b/src/nsterm.h index 0596f3f3c1..e7ea907569 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -443,7 +443,6 @@ #define NS_DRAW_TO_BUFFER 1 int maximized_width, maximized_height; NSWindow *nonfs_window; BOOL fs_is_native; - BOOL in_fullscreen_transition; #ifdef NS_DRAW_TO_BUFFER EmacsSurface *surface; #endif @@ -475,8 +474,6 @@ #define NS_DRAW_TO_BUFFER 1 - (void) toggleFullScreen: (id) sender; - (BOOL) fsIsNative; - (BOOL) isFullscreen; -- (BOOL) inFullScreenTransition; -- (void) waitFullScreenTransition; #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - (void) updateCollectionBehavior; #endif diff --git a/src/nsterm.m b/src/nsterm.m index f6168243a4..1503f5e2fb 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1640,8 +1640,6 @@ -(void)remove fullscreen also. So skip handleFS as this will print an error. */ if ([view fsIsNative] && [view isFullscreen]) { - // maybe it is not necessary to wait - [view waitFullScreenTransition]; return; } @@ -2057,11 +2055,7 @@ so some key presses (TAB) are swallowed by the system. */ #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 // child frame must not be in fullscreen if ([view fsIsNative] && [view isFullscreen]) - { - // in case child is going fullscreen - [view waitFullScreenTransition]; - [view toggleFullScreen:child]; - } + [view toggleFullScreen:child]; NSTRACE ("child setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary"); [child setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary]; #endif @@ -7963,22 +7957,6 @@ - (void)windowDidExitFullScreen /* provided for direct calls */ [[self window] performZoom:self]; } -- (BOOL)inFullScreenTransition -{ - return in_fullscreen_transition; -} - -- (void)waitFullScreenTransition -{ -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - while ([self inFullScreenTransition]) - { - NSTRACE ("wait for fullscreen"); - wait_reading_process_output (0, 300000000, 0, 1, Qnil, NULL, 0); - } -#endif -} - - (BOOL)fsIsNative { return fs_is_native; @@ -8058,14 +8036,8 @@ - (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:)]) - { -#endif - [[self window] toggleFullScreen:sender]; - // wait for fullscreen animation complete (bug#28496) - [self waitFullScreenTransition]; -#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070 - } #endif + [[self window] toggleFullScreen:sender]; #endif return; } -- 2.29.2 --hrn4dSw63p0mHlce--