Skip to content

Commit

Permalink
Condense parent logic and add delete-before
Browse files Browse the repository at this point in the history
  • Loading branch information
psionic-k committed Nov 17, 2023
1 parent 9509148 commit 7ca2443
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions keypression.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
Expand Down

0 comments on commit 7ca2443

Please sign in to comment.