Always call x-focus-frame, if using x. Use set-mouse-position on all systems, if focus-follows-mouse.
Attach a file by drag & drop or click to upload