Actually implement deleting/hiding posframes

This commit is contained in:
MitchMarq42 2023-08-11 15:44:11 -08:00
parent 177e878e15
commit 06221a2462

View File

@ -103,12 +103,17 @@
(defun notibox--hide (frame) (defun notibox--hide (frame)
"Stop showing FRAME." "Stop showing FRAME."
(posframe-hide "*notibox*")) (posframe-hide (window-buffer (frame-selected-window frame))))
(defun notibox-delete (frame) (defun notibox-delete (frame)
;; TODO: if parent, hide all. Otherwise just the one. "Delete the notibox FRAME.
(notibox--hide (car notibox-current-posframes))
If FRAME is the root Emacs window, or some other symbol, hide all notiboxes."
(if (and (framep frame) (not (frame-parent frame)))
(delete-frame frame)
(notibox--hide (car notibox-current-posframes)))
(pop notibox-current-posframes)) (pop notibox-current-posframes))
;; (frame-parent (selected-frame)) ;=> nil
(defun notibox--tail-echoarea () (defun notibox--tail-echoarea ()
"Show `current-message' in the notibox. If that does not exist, probably hide it." "Show `current-message' in the notibox. If that does not exist, probably hide it."