Skip to content

Commit 9365804

Browse files
committed
fix: accept focus on mac
1 parent d0888fd commit 9365804

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

jcs-poptip.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@
130130
(defun jcs-poptip--pre ()
131131
"Register for next pre command."
132132
(when-let* (((not (minibufferp)))
133-
((not (memq this-command '( jcs-poptip-focus jcs-poptip-focus-frame))))
133+
((not (memq this-command '( jcs-poptip-focus jcs-poptip-focus-frame
134+
handle-switch-frame))))
134135
(buffer (window-buffer (jcs-poptip--posframe-window)))
135136
((not (equal (current-buffer) buffer))))
136137
(add-hook 'post-command-hook #'jcs-poptip--next-post)
@@ -156,10 +157,12 @@ forever delay. HEIGHT of the tooltip that will display."
156157
:internal-border-width 1
157158
:internal-border-color (face-foreground 'font-lock-comment-face nil t)
158159
:left-fringe fringe-width :right-fringe fringe-width
159-
:override-parameters '((vertical-scroll-bars . t))))
160+
:override-parameters '((vertical-scroll-bars . t))
161+
:accept-focus t))
160162
(with-current-buffer (get-buffer-create jcs-poptip--buffer-name)
161163
(setq-local buffer-read-only t
162164
cursor-type 'hbar))
165+
(select-frame-set-input-focus (frame-parent jcs-poptip-frame))
163166
(add-hook 'pre-command-hook #'jcs-poptip--pre))
164167
(t
165168
(popup-tip string :point point :around t :height height :scroll-bar t :margin t)))

0 commit comments

Comments
 (0)