all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: rswgnu@gmail.com
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: select-frame-set-input-focus fails to raise the frame
Date: Wed, 13 Dec 2017 20:30:27 +0100	[thread overview]
Message-ID: <5A317FD3.4050509@gmx.at> (raw)
In-Reply-To: <CA+OMD9h8EHvDBV-w_sXBu-Oy_nco7LVJN2_3R+gsOiuD_dtaeg@mail.gmail.com>

 > 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.  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)))

 > In the prior example with raise-frame and lower-frame, we see there is
 > no problem combining the two of these but once (next-frame) is added
 > the combination of the two does not work.  Why?  Why would you expect
 > that to be the case?  Why is it not a bug?

It's by no means related to `next-frame' and it works here on Windows.
I have no idea why it doesn't work for you.

martin



  parent reply	other threads:[~2017-12-13 19:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 23:02 select-frame-set-input-focus fails to raise the frame Bob Weiner
2017-12-12 23:26 ` Robert Weiner
2017-12-13 20:47   ` Alan Third
2017-12-13 22:00     ` Robert Weiner
2017-12-13 22:26       ` Alan Third
2017-12-14  0:33         ` Robert Weiner
2017-12-14 21:03           ` Robert Weiner
2017-12-15 15:53             ` Robert Weiner
2017-12-15 16:10               ` Eli Zaretskii
2017-12-15 17:38                 ` Robert Weiner
2017-12-15 20:44                   ` Eli Zaretskii
2017-12-16 13:41                     ` Robert Weiner
2017-12-16 14:39                       ` Eli Zaretskii
2017-12-16 15:06                         ` Robert Weiner
2017-12-16 16:15                           ` Eli Zaretskii
2017-12-16 18:57                             ` Robert Weiner
2017-12-16 19:45                               ` Eli Zaretskii
2017-12-16 20:07                                 ` Robert Weiner
2017-12-16 19:06                             ` martin rudalics
2017-12-16 19:24                               ` Robert Weiner
2017-12-13  8:50 ` martin rudalics
2017-12-13 15:00   ` Robert Weiner
2017-12-13 16:07     ` Stefan Monnier
2017-12-13 16:33       ` Robert Weiner
2017-12-13 19:39         ` Eli Zaretskii
2017-12-13 19:30     ` martin rudalics [this message]
2017-12-13 22:14       ` Robert Weiner
2017-12-13 20:49 ` Alan Third
2017-12-13 21:53   ` Robert Weiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A317FD3.4050509@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=rswgnu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.