Function: posframe--redirect-posframe-focus

posframe--redirect-posframe-focus is a byte-compiled function defined in posframe.el.

Signature

(posframe--redirect-posframe-focus)

Documentation

Redirect focus from the posframe to the parent frame.

This prevents the posframe from catching keyboard input if the window manager selects it.

Source Code

;; Defined in ~/.emacs.d/elpa/posframe-20260415.14/posframe.el
(defun posframe--redirect-posframe-focus ()
  "Redirect focus from the posframe to the parent frame.
This prevents the posframe from catching keyboard input if the
window manager selects it."
  (when (and (eq (selected-frame) posframe--frame)
             ;; Do not redirect focus when posframe can accept focus.
             ;; See posframe-show's accept-focus argument.
             (not posframe--accept-focus))
    (redirect-frame-focus posframe--frame (frame-parent))))