branch: master commit 0e031b3543ea7afabdbe84111a110eccb3eb3fc7 Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
posframe: posframe--last-position -> posframe--last-posframe-pixel-position * posframe.el (posframe--last-posframe-pixel-position): rename posframe--last-position. (posframe--create-posframe): Use posframe--last-posframe-pixel-position instead. (posframe--set-frame-position): Use posframe--last-posframe-pixel-position instead. --- posframe.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/posframe.el b/posframe.el index 9a7a73f..628aa9a 100644 --- a/posframe.el +++ b/posframe.el @@ -111,7 +111,7 @@ (defvar-local posframe--frame nil "Record posframe's frame.") -(defvar-local posframe--last-position nil +(defvar-local posframe--last-posframe-pixel-position nil "Record the last pixel position of posframe's frame.") (defvar-local posframe--last-posframe-size nil @@ -184,7 +184,7 @@ This posframe's buffer is POSFRAME-BUFFER." (equal posframe--last-args args)) (posframe-delete-frame posframe-buffer) (setq-local posframe--last-args args) - (setq-local posframe--last-position nil) + (setq-local posframe--last-posframe-pixel-position nil) (setq-local posframe--last-posframe-size nil) (setq-local posframe--frame (make-frame @@ -442,13 +442,13 @@ WIDTH and MIN-WIDTH." parent-frame-height) "Move POSFRAME to POSITION. This need PARENT-FRAME-WIDTH and PARENT-FRAME-HEIGHT" - (unless (and (equal position posframe--last-position) + (unless (and (equal position posframe--last-posframe-pixel-position) ;; When working frame's size change, re-posit ;; the posframe. (equal posframe--last-parent-frame-size (cons parent-frame-width parent-frame-height))) (set-frame-position posframe (car position) (cdr position)) - (setq-local posframe--last-position position) + (setq-local posframe--last-posframe-pixel-position position) (setq-local posframe--last-parent-frame-size (cons parent-frame-width parent-frame-height))) ;; Make posframe's posframe--frame visible