[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 6dfc778 2/2: Fix fullscreen crash on macOS (bug#2
From: |
Alan Third |
Subject: |
[Emacs-diffs] emacs-26 6dfc778 2/2: Fix fullscreen crash on macOS (bug#28496) |
Date: |
Sat, 7 Oct 2017 16:58:43 -0400 (EDT) |
branch: emacs-26
commit 6dfc778d54ceb02b135d45300a201ec79edf1af2
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>
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 e501dae..7b57aa3 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2434,7 +2434,11 @@ See also `toggle-frame-maximized'."
(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