Commit 3d94931c authored by Eli Zaretskii's avatar Eli Zaretskii

Repair desktop restoration on text terminals

* lisp/desktop.el (desktop-restoring-frameset-p): Test for the GUI
frame here, instead of in desktop-restoring-frameset.  That's
because desktop-read wants to know whether frameset will actually
be restored, and has fallback procedures up its sleeve when it
won't be; these fallbacks need to be invoked when the frameset is
not going to be restored.  (Bug#24298)
parent 43022f98
......@@ -1157,13 +1157,13 @@ This function also sets `desktop-dirname' to nil."
;; ----------------------------------------------------------------------------
(defun desktop-restoring-frameset-p ()
"True if calling `desktop-restore-frameset' will actually restore it."
(and desktop-restore-frames desktop-saved-frameset t))
(and desktop-restore-frames desktop-saved-frameset (display-graphic-p) t))
(defun desktop-restore-frameset ()
"Restore the state of a set of frames.
This function depends on the value of `desktop-saved-frameset'
being set (usually, by reading it from the desktop)."
(when (and (display-graphic-p) (desktop-restoring-frameset-p))
(when (desktop-restoring-frameset-p)
(frameset-restore desktop-saved-frameset
:reuse-frames (eq desktop-restore-reuses-frames t)
:cleanup-frames (not (eq desktop-restore-reuses-frames 'keep))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment