[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/posframe 98587de 05/13: posframe.el (posframe--redirect

From: Feng Shu
Subject: [elpa] externals/posframe 98587de 05/13: posframe.el (posframe--redirect-posframe-focus): simplify
Date: Sun, 5 Apr 2020 07:58:03 -0400 (EDT)

branch: externals/posframe
commit 98587de311a87c795ec28d6799f6c04164064d9e
Author: SeungKi Kim <address@hidden>
Commit: SeungKi Kim <address@hidden>

    posframe.el (posframe--redirect-posframe-focus): simplify
 posframe.el | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/posframe.el b/posframe.el
index 7df03fe..e72544d 100644
--- a/posframe.el
+++ b/posframe.el
@@ -600,14 +600,8 @@ You can use `posframe-delete-all' to delete all posframes."
 (defun posframe--redirect-posframe-focus ()
   "Redirect focus from the posframe to the previous frame. This prevents the
 posframe from catching keyboard input if the window manager selects it."
-  (interactive)
-  (if (eq (selected-frame) posframe--frame)
-      (when posframe--previous-frame
-        (redirect-frame-focus posframe--frame posframe--previous-frame))
-    (progn
-      (setf posframe--previous-frame (selected-frame))
-      (when posframe--frame
-        (redirect-frame-focus posframe--frame posframe--previous-frame)))))
+  (when (eq (selected-frame) posframe--frame)
+    (redirect-frame-focus posframe--frame (frame-parent))))
 (add-hook 'focus-in-hook #'posframe--redirect-posframe-focus)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]