branch: master commit 1b309a2f1531865c45d70cb8cdcec6aaf5f78f3d Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
posframe: Add posframe-poshandler-frame-top-center * posframe.el (posframe-poshandler-frame-top-center): New poshandler --- posframe.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/posframe.el b/posframe.el index affc072..2262c44 100644 --- a/posframe.el +++ b/posframe.el @@ -728,6 +728,18 @@ be found in docstring of `posframe-show'." (plist-get info :posframe-height)) 2))) + +(defun posframe-poshandler-frame-top-center (info) + "Posframe's position handler. + +Get a position which let posframe stay onto its +parent-frame's top center. The structure of INFO can +be found in docstring of `posframe-show'." + (cons (/ (- (plist-get info :parent-frame-width) + (plist-get info :posframe-width)) + 2) + 0)) + (defun posframe-poshandler-frame-top-left-corner (_info) "Posframe's position handler.