We want to be sure that new frames are visible before deleting
any remaining ones.
+2013-07-26 Juanma Barranquero <lekktu@gmail.com>
+
+ * 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 <orontee@gmail.com>
* vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log.
(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)