From cbd6353058132361653a3aa323fc43553bb6bec8 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 15 Dec 2023 07:39:13 +0200 Subject: [PATCH] mu4e-compose: don't attempt deleting frames for now This needs some more work, so don't try to delete frames for now, which is better than the alternative. --- mu4e/mu4e-compose.el | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index 334c2571..4a91a10d 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -749,15 +749,19 @@ Is this address yours?" (undo-boundary)) (defun mu4e--maybe-delete-frame () - "Delete frame if there are multiple and current one has a single window." + "Delete frame if there are multiple and current one has a single +window." + ;; XXX: this doesn't quite work; need a way to filter out + ;; the one _real_ frame I'm looking at; but I always get 3 or so. ;; Only consider _real_ frames with some size - (when (one-window-p) - (let ((real-frames - (seq-filter (lambda (frame) - (> (or (frame-parameter frame 'width) 0) 0)) - (frame-list)))) - (when (> (length real-frames) 1) - (delete-frame))))) + ;; (when (one-window-p) + ;; (let ((real-frames + ;; (seq-filter (lambda (frame);; only count live visible parent frames. + ;; (not (frame-parent frame))) + ;; (visible-frame-list)))) + ;; (when (> (length real-frames) 1) + ;; (delete-frame)))) + ) (defun mu4e--compose-setup (compose-type compose-func &optional switch) "Set up a new buffer for mu4e message composition.