GNU bug report logs -
#43672
28.0.50; select-frame-set-input-focus does not set focus first time called
Previous Next
Full log
Message #20 received at 43672 <at> debbugs.gnu.org (full text, mbox):
> When calling
>
> (select-frame-set-input-focus some-frame)
>
> the frame is raised, but does not recieve the focus. I have to call
> twice to 'select-frame-set-input-focus' for the frame to get
> focused. Docs says "focused if possible", so I am not sure if it some
> bug or/and how much does it depend on my window manager used; but
> calling it twice consecutively works.
>
> I have attached an example code. To reproduce, emacs -Q, an eval
> attached code.
These two settings don't make much sense
(child-frame (make-frame '((visible . 0)
(undecorated . 0)
For the moment let's stick to the simpler
(defvar child-frame nil)
(defun make-child-frame ()
(interactive)
(setq child-frame
(make-frame `((parent-frame . ,(selected-frame))
(left . 10)
(top . 10)
(width . 20)
(height . 10))))
(select-frame-set-input-focus child-frame))
(defun delete-child-frame ()
(interactive)
(delete-frame child-frame))
If you call 'make-child-frame', does the child frame get selected?
If not, we have to try some workaround, maybe a (sit-for 0) before the
'select-frame-set-input-focus' call.
martin
This bug report was last modified 3 years and 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.