summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Shu <tumashu@163.com>2021-04-08 14:38:43 +0800
committerFeng Shu <tumashu@163.com>2021-04-08 14:39:40 +0800
commitada1dbab9bb203207586e2f6d359b4949602e50f (patch)
tree05de9a7d138dadef49caa65a59d65513b9b4d568
parent3132719a9a7c04431fe65f1dced8acafe789bdf6 (diff)
Try to handle EXWM environment.
* ivy-posframe.el (ivy-posframe-parent-frame-poshandler): New variable. (ivy-posframe--display): use parent-frame-poshandler.
-rw-r--r--ivy-posframe.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 9e8acc5..1dfebaf 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -177,6 +177,16 @@ When nil, Using current frame's font as fallback."
"The height of ivy-min-posframe."
:type 'number)
+(defcustom ivy-posframe-parent-frame-poshandler nil
+ "The parent frame poshandler use by ivy-posframe.
+
+User can set it to a function like:
+
+ (lambda () (cons 0 0))
+
+in EXWM environment."
+ :type 'function)
+
(defcustom ivy-posframe-size-function #'ivy-posframe-get-size
"The function which is used to deal with posframe's size."
:type 'function)
@@ -255,6 +265,7 @@ This variable is useful for `ivy-posframe-read-action' .")
:internal-border-width ivy-posframe-border-width
:internal-border-color (face-attribute 'ivy-posframe-border :background nil t)
:override-parameters ivy-posframe-parameters
+ :parent-frame-poshandler ivy-posframe-parent-frame-poshandler
(funcall ivy-posframe-size-function))
(ivy-posframe--add-prompt 'ignore)))
(with-current-buffer ivy-posframe-buffer