[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/posframe a410942 2/2: * posframe.el (posframe-show): De
From: |
ELPA Syncer |
Subject: |
[elpa] externals/posframe a410942 2/2: * posframe.el (posframe-show): Deal with posframe-x/y < 0 when mouse banish. |
Date: |
Thu, 28 Oct 2021 12:57:31 -0400 (EDT) |
branch: externals/posframe
commit a410942c3fa7ebd82593c3a37b08850819493941
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* posframe.el (posframe-show): Deal with posframe-x/y < 0 when mouse banish.
---
posframe.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/posframe.el b/posframe.el
index 0636820..b1e3e9f 100644
--- a/posframe.el
+++ b/posframe.el
@@ -705,8 +705,16 @@ You can use `posframe-delete-all' to delete all posframes."
(car mouse-position))
:mouse-y (+ (or (cdr ref-position) 0)
(cdr mouse-position))
- :posframe-x (car position)
- :posframe-y (cdr position)
+ :posframe-x
+ (if (>= (car position) 0)
+ (car position)
+ (- (frame-pixel-width parent-frame)
+ (frame-pixel-width posframe)))
+ :posframe-y
+ (if (>= (cdr position) 0)
+ (cdr position)
+ (- (frame-pixel-height parent-frame)
+ (frame-pixel-height posframe)))
:posframe-width (frame-pixel-width posframe)
:posframe-height (frame-pixel-height posframe))))