emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/posframe cae2864 1/3: Fix focus-in-hook warn


From: Feng Shu
Subject: [elpa] externals/posframe cae2864 1/3: Fix focus-in-hook warn
Date: Tue, 1 Dec 2020 02:00:46 -0500 (EST)

branch: externals/posframe
commit cae286410a94c52836e0aa279e8b063443fef47d
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    Fix focus-in-hook warn
---
 posframe.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index c48fd36..d089f6b 100644
--- a/posframe.el
+++ b/posframe.el
@@ -685,7 +685,9 @@ posframe from catching keyboard input if the window manager 
selects it."
              (frame-parameter (selected-frame) 'no-accept-focus))
     (redirect-frame-focus posframe--frame (frame-parent))))
 
-(add-hook 'focus-in-hook #'posframe--redirect-posframe-focus)
+(if (string> emacs-version "27.1")
+    (add-function :after after-focus-change-function 
#'posframe--redirect-posframe-focus)
+  (add-hook 'focus-in-hook #'posframe--redirect-posframe-focus))
 
 (defun posframe--mouse-banish (parent-frame &optional posframe)
   "Banish mouse to the (0 . 0) of PARENT-FRAME.



reply via email to

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