summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2016-05-16 20:37:23 +0200
committerAnders Lindgren <andlind@gmail.com>2016-05-16 20:37:23 +0200
commit06cb28ff3f24a29fa140d8af747d10abeed44293 (patch)
tree534ab5780fa5bba3e17fa198e3228d5fba516805
parent9ca5dbf947a7421d37b3e2d2bc6b8d2c9218bc65 (diff)
downloademacs-06cb28ff3f24a29fa140d8af747d10abeed44293.tar.gz
Fix bug#23462: Crash when iconifying frame on OS X.
* src/nsterm.m (x_iconify_frame): Block input while miniaturize is running.
-rw-r--r--src/nsterm.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 34c5395b630..e6a10b89f81 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1612,7 +1612,12 @@ x_iconify_frame (struct frame *f)
[[view window] orderOut: NSApp];
[[view window] setFrame: t display: NO];
}
+
+ /* Processing input while Emacs is being minimized can cause a
+ crash, so block it for the duration. */
+ block_input();
[[view window] miniaturize: NSApp];
+ unblock_input();
}
/* Free X resources of frame F. */