all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Andrii Kolomoiets <andreyk.mad@gmail.com>
Cc: Illia Ostapyshyn <ilya.ostapyshyn@gmail.com>, 48406@debbugs.gnu.org
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	[thread overview]
Message-ID: <YLuAArpeV1sBH5P9@breton.holly.idiocy.org> (raw)
In-Reply-To: <m2cztqfnjw.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

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

[-- Attachment #2: 0001-Remove-pause-on-fullscreening-in-NS-bug-48406.patch --]
[-- Type: text/plain, Size: 3529 bytes --]

From 237ad27c3164483cc3c0a9c870db2653456f076c Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
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


  parent reply	other threads:[~2021-06-05 13:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 20:39 bug#48406: 28.0.50; Emacs stuck in infinite loop in wait_reading_process_output when opening in fullscreen (NS) Illia Ostapyshyn
2021-05-13 21:15 ` Alan Third
2021-05-14  6:07   ` Andrii Kolomoiets
2021-05-14  9:13     ` Illia Ostapyshyn
2021-05-14 19:32       ` Andrii Kolomoiets
2021-05-14 20:34         ` Alan Third
2021-05-15 19:44           ` Andrii Kolomoiets
2021-05-15 22:47             ` Alan Third
2021-05-16 20:09               ` Andrii Kolomoiets
2021-05-26 20:26                 ` Alan Third
2021-05-26 20:28                   ` Alan Third
2021-06-05 13:45                 ` Alan Third [this message]
2021-06-05 16:21                   ` Illia Ostapyshyn
2021-06-05 16:33                     ` Alan Third
2021-06-09 21:01                       ` Alan Third
2021-05-14 22:53         ` Filipp Gunbin
2021-05-15  8:34         ` Illia Ostapyshyn
2021-05-14  6:22 ` Eli Zaretskii
2021-05-14  9:22   ` Illia Ostapyshyn
2021-05-14 10:55     ` Eli Zaretskii
2021-05-14 11:09       ` Illia Ostapyshyn
2021-05-14 11:13         ` Eli Zaretskii

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=YLuAArpeV1sBH5P9@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=48406@debbugs.gnu.org \
    --cc=andreyk.mad@gmail.com \
    --cc=ilya.ostapyshyn@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.