unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
Subject: select-frame-set-input-focus mystery
Date: Wed, 17 May 2006 23:45:11 +0100	[thread overview]
Message-ID: <90898990-06F8-4ED7-8A42-BD4BDFECB28E@gmail.com> (raw)

While producing a fix for the pop-to-buffer problem, I encountered  
this strange behavior. Can somebody please explain what's happening,  
or check if this is a bug?

The following code should select frame f1 and set input focus to it.  
(Open a second frame and keep it partially over the first one to  
reproduce.)

(let ((f1 (car (frame-list)))
       (f2 (car (cdr (frame-list)))))

   (print f2)
   (select-frame-set-input-focus f2)
   (print f1)
   (select-frame-set-input-focus f1))


However, in my Emacs build (current CVS Emacs, Carbon port) it will  
leave f1 raised, but set input focus to f2.

Additionally, if you want to select f2 with a mouse click (into the  
single window shown), it will NOT be selected!

However, the following will work just fine:

(let ((f1 (car (frame-list)))
       (f2 (car (cdr (frame-list)))))

   (print f2)
   (select-frame-set-input-focus f2)
   (print f1)
   (message "test")
   (select-frame-set-input-focus f1))

Note that all I've done was to insert a `message' command.

The documentation of `select-frame' says that the window manager may  
select another frame upon returning to the main event loop.
However, one would expect that `select-frame-set-input-focus' sets  
the input focus in a way that actually works in all circumstances,  
right?

             reply	other threads:[~2006-05-17 22:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 22:45 David Reitter [this message]
     [not found] ` <wlwtckunhs.wl%mituharu@math.s.chiba-u.ac.jp>
2006-05-18  9:57   ` select-frame-set-input-focus mystery David Reitter

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=90898990-06F8-4ED7-8A42-BD4BDFECB28E@gmail.com \
    --to=david.reitter@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).