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

    corfu--make-frame: Set delete-before frame parameter for EXWM (Fix #631)
    
    Since the child frame is unparented, delete-frame does not work otherwise.
---
 corfu.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index bd3b314a5e5..dc9daf4a09b 100644
--- a/corfu.el
+++ b/corfu.el
@@ -510,9 +510,11 @@ 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)
-             (display-graphic-p frame) (frame-parent frame))
+  (when-let* (((bound-and-true-p exwm--connection))
+              ((display-graphic-p frame))
+              (parent (frame-parent frame)))
     (redisplay t)
+    (set-frame-parameter frame 'delete-before parent)
     (set-frame-parameter frame 'parent-frame nil))
   frame)
 

Reply via email to