aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Reitter2015-11-07 08:32:59 -0500
committerDavid Reitter2015-11-07 08:40:13 -0500
commit53def55b4391f43aecf18bc02b61e055e4b2edd3 (patch)
tree272b55015caba7ae379ad60b7b470a714d5b8034
parentfc61ea4fd744480dcd5cd174f4599e135752882a (diff)
downloademacs-53def55b4391f43aecf18bc02b61e055e4b2edd3.tar.gz
emacs-53def55b4391f43aecf18bc02b61e055e4b2edd3.zip
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.
-rw-r--r--src/nsterm.m18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index b4ec553d7ee..9a2249c57bb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6380,7 +6380,11 @@ not_in_argv (NSString *arg)
6380- (void)windowDidResize: (NSNotification *)notification 6380- (void)windowDidResize: (NSNotification *)notification
6381{ 6381{
6382 NSTRACE ("windowDidResize"); 6382 NSTRACE ("windowDidResize");
6383 6383 if (!FRAME_LIVE_P (emacsframe))
6384 {
6385 NSTRACE_MSG ("Ignored (frame dead)");
6386 return;
6387 }
6384 if (emacsframe->output_data.ns->in_animation) 6388 if (emacsframe->output_data.ns->in_animation)
6385 { 6389 {
6386 NSTRACE_MSG ("Ignored (in animation)"); 6390 NSTRACE_MSG ("Ignored (in animation)");
@@ -6902,7 +6906,11 @@ not_in_argv (NSString *arg)
6902- (void)windowWillExitFullScreen:(NSNotification *)notification 6906- (void)windowWillExitFullScreen:(NSNotification *)notification
6903{ 6907{
6904 NSTRACE ("windowWillExitFullScreen"); 6908 NSTRACE ("windowWillExitFullScreen");
6905 6909 if (!FRAME_LIVE_P (emacsframe))
6910 {
6911 NSTRACE_MSG ("Ignored (frame dead)");
6912 return;
6913 }
6906 if (next_maximized != -1) 6914 if (next_maximized != -1)
6907 fs_before_fs = next_maximized; 6915 fs_before_fs = next_maximized;
6908} 6916}
@@ -6910,7 +6918,11 @@ not_in_argv (NSString *arg)
6910- (void)windowDidExitFullScreen:(NSNotification *)notification 6918- (void)windowDidExitFullScreen:(NSNotification *)notification
6911{ 6919{
6912 NSTRACE ("windowDidExitFullScreen"); 6920 NSTRACE ("windowDidExitFullScreen");
6913 6921 if (!FRAME_LIVE_P (emacsframe))
6922 {
6923 NSTRACE_MSG ("Ignored (frame dead)");
6924 return;
6925 }
6914 [self setFSValue: fs_before_fs]; 6926 [self setFSValue: fs_before_fs];
6915 fs_before_fs = -1; 6927 fs_before_fs = -1;
6916#ifdef HAVE_NATIVE_FS 6928#ifdef HAVE_NATIVE_FS