>From 2d756250d7990dc9a6a452e8282cc32d16d2099a Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 1 Oct 2017 00:06:23 +0100 Subject: [PATCH] Fix fullscreen crash on macOS (bug#28496) * lisp/frame.el (toggle-frame-fullscreen): Wait for animation to complete on macOS. --- lisp/frame.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/frame.el b/lisp/frame.el index 76c1842455..b70f55e981 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2434,7 +2434,11 @@ toggle-frame-fullscreen (set-frame-parameter nil 'fullscreen fullscreen-restore) (set-frame-parameter nil 'fullscreen nil))) (modify-frame-parameters - nil `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen)))))) + nil `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen)))) + ;; Manipulating a frame without waiting for the fullscreen + ;; animation to complete can cause a crash, or other unexpected + ;; behaviour, on macOS (bug#28496). + (when (featurep 'cocoa) (sit-for 1)))) ;;;; Key bindings -- 2.14.1