summaryrefslogtreecommitdiff
path: root/corfu.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-02-06 18:22:09 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-02-06 18:22:09 +0100
commit5bbb86e56b39af0df800c3eed0cbae77f035f649 (patch)
treeb063e999dab944e739fed4a915aae1b4e824a76b /corfu.el
parentb48d3017a47706198e04440cc1b3483bdf646771 (diff)
Attempt to fix Corfu popup on multiple EXWM monitorsexwm-fix
Diffstat (limited to 'corfu.el')
-rw-r--r--corfu.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/corfu.el b/corfu.el
index 9b10da2..4f628eb 100644
--- a/corfu.el
+++ b/corfu.el
@@ -453,8 +453,9 @@ FRAME is the existing frame."
(after-make-frame-functions)
(parent (window-frame)))
(unless (and (frame-live-p frame)
- (eq (frame-parent frame)
- (and (not (bound-and-true-p exwm--connection)) parent))
+ (eq parent (if (bound-and-true-p exwm--connection)
+ (frame-parameter frame 'corfu--exwm-parent)
+ (frame-parent frame)))
;; If there is more than one window, `frame-root-window' may
;; return nil. Recreate the frame in this case.
(window-live-p (frame-root-window frame)))
@@ -504,7 +505,9 @@ FRAME is the existing frame."
(make-frame-visible frame)
;; Unparent child frame if EXWM is used, otherwise EXWM buffers are drawn on
;; top of the Corfu child frame.
- (when (and (bound-and-true-p exwm--connection) (frame-parent frame))
+ (when-let (((bound-and-true-p exwm--connection))
+ (parent (frame-parent frame)))
+ (set-frame-parameter frame 'corfu--exwm-parent parent)
(set-frame-parameter frame 'parent-frame nil))
frame)