From: Juanma Barranquero Date: Fri, 26 Jul 2013 14:01:19 +0000 (+0200) Subject: lisp/desktop.el (desktop-restore-frames): Call `sit-for'. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1698^2~32 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=045f7a53f9cd934488d5ac75d023c57eee059e85;p=emacs.git lisp/desktop.el (desktop-restore-frames): Call `sit-for'. We want to be sure that new frames are visible before deleting any remaining ones. --- 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)