emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: select-frame-set-input-focus fails to raise the frame


From: Robert Weiner
Subject: Re: select-frame-set-input-focus fails to raise the frame
Date: Wed, 13 Dec 2017 17:14:06 -0500

On Wed, Dec 13, 2017 at 2:30 PM, martin rudalics <address@hidden> wrote:
> Can you explain what the problem is and why you think it is unsolvable?

On most systems I know this one ...

  (let ((depress-frame (selected-frame))
        (release-frame (make-frame)))
    (select-frame-set-input-focus depress-frame)
    ;; On MacOS, depress-frame is never raised to the top
    ;; of the frame stack and never is given input focus
    ;; after release-frame is created.
    (sit-for 4)
    (select-frame-set-input-focus release-frame)))

... happens because a new frame is always raised and gets input focus
unless certain precautions are taken.

​Yes, that seems to be the case on MacOS as well.  But why
even if I add a (sit-for 4) before (select-frame-set-input-focus depress-frame)
is that frame not raised and given focus?​
​​
The following works here on
Windows:

(defun test ()
  (let ((depress-frame (selected-frame))
        (release-frame (make-frame '((no-focus-on-map . t)))))
    (select-frame-set-input-focus depress-frame)
    ;; On MacOS, depress-frame is never raised to the top
    ;; of the frame stack and never is given input focus
    ;; after release-frame is created.
    (sit-for 4)
    (select-frame-set-input-focus release-frame)))

​Yes, that works find on MacOS as well, so that will have to be the solution.
Thanks much.​

Bob


reply via email to

[Prev in Thread] Current Thread [Next in Thread]