branch: externals/corfu
commit 1c53066c413faac4afe853153fdb00475c3e4c78
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    Support the EXWM window manager
---
 CHANGELOG.org |  6 ++++++
 corfu.el      | 10 ++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 0966c68e56..13d739126a 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,6 +2,12 @@
 #+author: Daniel Mendler
 #+language: en
 
+* Development
+
+- Support the EXWM window manager.
+- Optimization: Reduce auto completion timer overhead.
+- Use ~internal-border-width~ instead of ~child-frame-border-width~.
+
 * Version 1.1 (2023-12-27)
 
 - Deduplicate candidates with respect to ~equal-including-properties~, such 
that
diff --git a/corfu.el b/corfu.el
index 1af5cb6ec7..16d0546718 100644
--- a/corfu.el
+++ b/corfu.el
@@ -454,7 +454,8 @@ FRAME is the existing frame."
          (after-make-frame-functions)
          (parent (window-frame)))
     (unless (and (frame-live-p frame)
-                 (eq (frame-parent frame) parent)
+                 (eq (frame-parent frame)
+                     (and (not (bound-and-true-p exwm--connection)) parent))
                  ;; 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)))
@@ -495,7 +496,12 @@ FRAME is the existing frame."
     (set-frame-size frame width height t)
     (unless (equal (frame-position frame) (cons x y))
       (set-frame-position frame x y)))
-  (make-frame-visible 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))
+    (set-frame-parameter frame 'parent-frame nil))
+  frame)
 
 (defun corfu--hide-frame-deferred (frame)
   "Deferred hiding of child FRAME."

Reply via email to