[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6616806: * lisp/frameset.el (frameset-restore): Mak
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] master 6616806: * lisp/frameset.el (frameset-restore): Make sure last-focus frame has focus. |
Date: |
Sat, 17 Aug 2019 18:40:39 -0400 (EDT) |
branch: master
commit 6616806896060d95355c965599517d7065c19b86
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>
* 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.
(Bug#36894)
---
lisp/frameset.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lisp/frameset.el b/lisp/frameset.el
index 60b6fe3..9a7a75f 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -1346,6 +1346,16 @@ All keyword parameters default to nil."
(error
(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)))
+ frameset--action-map))))
+ (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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6616806: * lisp/frameset.el (frameset-restore): Make sure last-focus frame has focus.,
Juri Linkov <=