From d3483cbe55aa05c76cd2511b5d922e811b5082e5 Mon Sep 17 00:00:00 2001 From: zhenhua-wang <wang_zhenhua1996@icloud.com> Date: Sat, 9 Sep 2023 16:45:47 -0500 Subject: [PATCH] fix frame position for exwm-workspace-detach-minibuffer --- exwm-workspace.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/exwm-workspace.el b/exwm-workspace.el index a612202..d934c2c 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -1107,13 +1107,17 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first." 'exwm-container))) (dolist (f exwm-workspace--list) (with-slots (_ _ x y width height) (exwm-workspace--get-geometry f) - (set-frame-parameter f 'exwm-geometry - (make-instance 'xcb:RECTANGLE - :x x - :y y - :width width - :height (+ height (frame-pixel-height - exwm-workspace--minibuffer)))))) + (let* ((minibuffer-pixel-height (frame-pixel-height exwm-workspace--minibuffer)) + (y (if (eq exwm-workspace-minibuffer-position 'top) + (- y minibuffer-pixel-height) + y)) + (height (+ height minibuffer-pixel-height))) + (set-frame-parameter f 'exwm-geometry + (make-instance 'xcb:RECTANGLE + :x x + :y y + :width width + :height height))))) (setq exwm-workspace--id-struts-alist (assq-delete-all container exwm-workspace--id-struts-alist)) (exwm-workspace--update-struts)