From 045f7a53f9cd934488d5ac75d023c57eee059e85 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 26 Jul 2013 16:01:19 +0200 Subject: [PATCH] lisp/desktop.el (desktop-restore-frames): Call `sit-for'. We want to be sure that new frames are visible before deleting any remaining ones. --- lisp/ChangeLog | 6 ++++++ lisp/desktop.el | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7074c0b4dd..59f2bed01aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-07-26 Juanma Barranquero + + * desktop.el (desktop-restore-frames): Call `sit-for' once all frames + are restored to be sure that they are visible before deleting any + remaining ones. + 2013-07-26 Matthias Meulien * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. diff --git a/lisp/desktop.el b/lisp/desktop.el index 28c781d95e2..a29a30971aa 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1404,6 +1404,10 @@ being set (usually, by reading it from the desktop)." (error (delay-warning 'desktop (error-message-string err) :error)))) + ;; In case we try to delete the initial frame, we want to make sure that + ;; other frames are already visible (discussed in thread for bug#14841). + (sit-for 0 t) + ;; Delete remaining frames, but do not fail if some resist being deleted. (unless (eq desktop-restoring-reuses-frames 'keep) (dolist (frame desktop--reuse-list) -- 2.39.2