[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
select-frame-set-input-focus mystery
From: |
David Reitter |
Subject: |
select-frame-set-input-focus mystery |
Date: |
Wed, 17 May 2006 23:45:11 +0100 |
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?
- select-frame-set-input-focus mystery,
David Reitter <=