Commit 66168068 authored by Juri Linkov's avatar Juri Linkov

* lisp/frameset.el (frameset-restore): Make sure last-focus frame has focus.

Call select-frame-set-input-focus to restore focus on the frame
that had last-focus-update frame parameter before saving frameset.
parent c81c041f
Pipeline #2878 failed with stage
in 57 minutes and 41 seconds
......@@ -1346,6 +1346,16 @@ All keyword parameters default to nil."
(delay-warning 'frameset (error-message-string err) :warning))))))
;; Make sure the frame with last-focus-update has focus.
(let ((last-focus-frame
(catch 'last-focus
(maphash (lambda (frame _)
(when (frame-parameter frame 'last-focus-update)
(throw 'last-focus frame)))
(when last-focus-frame
(select-frame-set-input-focus last-focus-frame)))
;; Make sure there's at least one visible frame.
(unless (or (daemonp)
(catch 'visible
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