From 7ca24432ffa28696ac5501be3be124fb522a2023 Mon Sep 17 00:00:00 2001 From: Psionik K <73710933+psionic-k@users.noreply.github.com> Date: Sat, 18 Nov 2023 02:26:40 +0900 Subject: [PATCH] Condense parent logic and add delete-before --- keypression.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/keypression.el b/keypression.el index 2c91d76..5e549c6 100644 --- a/keypression.el +++ b/keypression.el @@ -578,7 +578,7 @@ the command is ignored." (keypression--create-arrays) (keypression--create-fade-out-timer) (add-hook 'kill-emacs-hook #'keypression--finalize) - (let* ((parent-frame (when keypression-use-child-frame (window-frame (selected-window)))) + (let* ((parent-frame (window-frame (selected-window))) (fg (if (keypression--light-background-p) keypression-foreground-for-light-mode keypression-foreground-for-dark-mode)) @@ -589,12 +589,12 @@ the command is ignored." (with-current-buffer (get-buffer-create (format " *keypression-%d*" i)) (with-selected-frame (keypression--create-frame (current-buffer) - :override-parameters (if keypression-use-child-frame - `((parent-frame . ,parent-frame) - (font . ,keypression-font)) - `((parent-frame . ,parent-frame) - (z-group . above) - (font . ,keypression-font))) + :override-parameters + `((parent-frame ,(when keypression-use-child-frame + parent-frame)) + (delete-before . ,parent-frame) + (font . ,keypression-font) + (z-group . ,(unless keypression-use-child-frame 'above))) :foreground-color fg :background-color bg :left-fringe keypression-left-fringe