emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 53def55: Ignore fullscreen exit notifications on NS


From: David Reitter
Subject: [Emacs-diffs] master 53def55: Ignore fullscreen exit notifications on NS when frame is dead
Date: Sat, 07 Nov 2015 13:41:44 +0000

branch: master
commit 53def55b4391f43aecf18bc02b61e055e4b2edd3
Author: David Reitter <address@hidden>
Commit: David Reitter <address@hidden>

    Ignore fullscreen exit notifications on NS when frame is dead
    
    * nsterm.m (windowDidResize:,windowWillExitFullScreen:)
      (windowDidExitFullScreen:): Return if frame is dead.
      These functions may be called when a fullscreen frame
      is closed; they are called before, not after.
    
    May address Bug#21428.
---
 src/nsterm.m |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/nsterm.m b/src/nsterm.m
index b4ec553..9a2249c 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6380,7 +6380,11 @@ not_in_argv (NSString *arg)
 - (void)windowDidResize: (NSNotification *)notification
 {
   NSTRACE ("windowDidResize");
-
+  if (!FRAME_LIVE_P (emacsframe))
+    {
+      NSTRACE_MSG ("Ignored (frame dead)");
+      return;
+    }
   if (emacsframe->output_data.ns->in_animation)
     {
       NSTRACE_MSG ("Ignored (in animation)");
@@ -6902,7 +6906,11 @@ not_in_argv (NSString *arg)
 - (void)windowWillExitFullScreen:(NSNotification *)notification
 {
   NSTRACE ("windowWillExitFullScreen");
-
+  if (!FRAME_LIVE_P (emacsframe))
+    {
+      NSTRACE_MSG ("Ignored (frame dead)");
+      return;
+    }
   if (next_maximized != -1)
     fs_before_fs = next_maximized;
 }
@@ -6910,7 +6918,11 @@ not_in_argv (NSString *arg)
 - (void)windowDidExitFullScreen:(NSNotification *)notification
 {
   NSTRACE ("windowDidExitFullScreen");
-
+  if (!FRAME_LIVE_P (emacsframe))
+    {
+      NSTRACE_MSG ("Ignored (frame dead)");
+      return;
+    }
   [self setFSValue: fs_before_fs];
   fs_before_fs = -1;
 #ifdef HAVE_NATIVE_FS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]