branch: externals/corfu
commit de08a43be4a3cb2fe96e1ad8e5842819c1e346d0
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
corfu--make-frame: Add frame name for debugging
Improve readability of (frame-list).
---
corfu.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/corfu.el b/corfu.el
index 2ea7c152a4..6e322e240a 100644
--- a/corfu.el
+++ b/corfu.el
@@ -479,21 +479,21 @@ FRAME is the existing frame."
(x-gtk-resize-child-frames corfu--gtk-resize-child-frames)
(before-make-frame-hook)
(after-make-frame-functions)
- (parent (window-frame)))
+ (parent (window-frame))
+ (graphic (display-graphic-p parent)))
(unless (and (frame-live-p frame)
(eq (frame-parent frame)
- (and (not (and (bound-and-true-p exwm--connection)
- (display-graphic-p parent)))
+ (and (not (and graphic (bound-and-true-p
exwm--connection)))
parent))
;; Handle mixed tty/graphical sessions
- (eq (display-graphic-p frame)
- (display-graphic-p parent))
+ (eq graphic (display-graphic-p 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)))
(when frame (delete-frame frame))
(setq frame (make-frame
`((parent-frame . ,parent)
+ (name . ,(if graphic "EmacsCorfuGUI" "EmacsCorfuTTY"))
(minibuffer . ,(minibuffer-window parent))
(width . 0) (height . 0) (visibility . nil)
(right-fringe . ,right-fringe-width)