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. If I missunderstand docs, or am calling it wrongly, dissregard the rapport plz :-).