I tried creating a new frame and setting the mouse pointer to its 0,0 position in 21.3 on Linux:

(let ((frame (make-frame ...)))
  (set-mouse-position frame 0 0))

Sometimes it works, sometimes the pointer is put into the 0,0 corner of the desktop instead.

Maybe make-frame returns before the frame actually appears? The documentation doesn't say so. If this is the case is there a standard way to wait for the frame "to be ready"?

I thought about polling it with frame-visible-p, but this method doesn't seem too elegant.

Is there an other way?

--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to