From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: select-frame-set-input-focus fails to raise the frame Date: Wed, 13 Dec 2017 17:14:06 -0500 Message-ID: References: <5A30E9E2.5060504@gmx.at> <5A317FD3.4050509@gmx.at> Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113d7018c702cb0560401723" X-Trace: blaine.gmane.org 1513203317 20484 195.159.176.226 (13 Dec 2017 22:15:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Dec 2017 22:15:17 +0000 (UTC) Cc: emacs-devel To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 13 23:15:13 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePFJ2-00050K-B7 for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2017 23:15:12 +0100 Original-Received: from localhost ([::1]:38003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePFJ9-0006Bi-Hm for ged-emacs-devel@m.gmane.org; Wed, 13 Dec 2017 17:15:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePFIW-0006BO-TZ for emacs-devel@gnu.org; Wed, 13 Dec 2017 17:14:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePFIT-0002Uw-OQ for emacs-devel@gnu.org; Wed, 13 Dec 2017 17:14:40 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePFIT-0002UN-KO for emacs-devel@gnu.org; Wed, 13 Dec 2017 17:14:37 -0500 Original-Received: from mail-qt0-f169.google.com ([209.85.216.169]:39669) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ePFIT-00056d-9b for emacs-devel@gnu.org; Wed, 13 Dec 2017 17:14:37 -0500 Original-Received: by mail-qt0-f169.google.com with SMTP id k19so5678828qtj.6 for ; Wed, 13 Dec 2017 14:14:37 -0800 (PST) X-Gm-Message-State: AKGB3mLJSfJsitpRvfhNp1+ap0+Ca4MBT48QDlNeFlodZc+ePWLLYJBZ 41FAW1ZW3wf3w4GTdHmHZhIWnQXpImJiNGQjhbI= X-Google-Smtp-Source: ACJfBou3gkKcrClKm/0OTJL+fNs1ijKx0xCchv2fehdXiciQzJdSnGJSDXcJ5PfBmhHoyS9brD5b0+e7xmRV9crJOy4= X-Received: by 10.200.51.143 with SMTP id c15mr13610942qtb.46.1513203276642; Wed, 13 Dec 2017 14:14:36 -0800 (PST) Original-Received: by 10.200.55.124 with HTTP; Wed, 13 Dec 2017 14:14:06 -0800 (PST) In-Reply-To: <5A317FD3.4050509@gmx.at> X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221028 Archived-At: --001a113d7018c702cb0560401723 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 13, 2017 at 2:30 PM, martin rudalics 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. =E2=80=8BYes, 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?=E2=80=8B =E2=80=8B=E2=80=8B > 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))) > =E2=80=8BYes, that works find on MacOS as well, so that will have to be the solution. Thanks much.=E2=80=8B Bob --001a113d7018c702cb0560401723 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Dec 13, 2= 017 at 2:30 PM, martin rudalics <rudalics@gmx.at> wrote:
> Can you explain = what the problem is and why you think it is unsolvable?

On most systems I know this one ...

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

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

=E2=80=8B= Yes, that seems to be the case on MacOS as well.=C2=A0 But why
even if I a= dd a (sit-for 4) before (select-frame-set-input-focus depress-frame)
<= div class=3D"gmail_default" style=3D"font-family:monospace,monospace">is th= at frame not raised and given focus?=E2=80=8B
=E2=80=8B=E2=80=8B
The following works here on
Windows:

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

=E2=80=8BYes, that works find on MacOS as well, so that= will have to be the solution.
Thanks much.=E2=80=8B

Bob

--001a113d7018c702cb0560401723--