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

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

[elpa] externals/posframe f702abc 1/2: * posframe.el (posframe-show): Do


From: ELPA Syncer
Subject: [elpa] externals/posframe f702abc 1/2: * posframe.el (posframe-show): Do not banish mouse when it is outside emacs.
Date: Thu, 28 Oct 2021 12:57:30 -0400 (EDT)

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

    * posframe.el (posframe-show): Do not banish mouse when it is outside emacs.
---
 posframe.el | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/posframe.el b/posframe.el
index c633b2c..0636820 100644
--- a/posframe.el
+++ b/posframe.el
@@ -697,16 +697,18 @@ You can use `posframe-delete-all' to delete all 
posframes."
                              (cons parent-buffer-name parent-buffer)))
 
       ;; Mouse banish
-      (posframe--mouse-banish
-       (list :parent-frame parent-frame
-             :mouse-x (+ (or (car ref-position) 0)
-                         (car mouse-position))
-             :mouse-y (+ (or (cdr ref-position) 0)
-                         (cdr mouse-position))
-             :posframe-x (car position)
-             :posframe-y (cdr position)
-             :posframe-width (frame-pixel-width posframe)
-             :posframe-height (frame-pixel-height posframe)))
+      (when (and (car mouse-position)
+                 (cdr mouse-position))
+        (posframe--mouse-banish
+         (list :parent-frame parent-frame
+               :mouse-x (+ (or (car ref-position) 0)
+                           (car mouse-position))
+               :mouse-y (+ (or (cdr ref-position) 0)
+                           (cdr mouse-position))
+               :posframe-x (car position)
+               :posframe-y (cdr position)
+               :posframe-width (frame-pixel-width posframe)
+               :posframe-height (frame-pixel-height posframe))))
 
       ;; Return posframe
       posframe)))



reply via email to

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