At 03:56 PM 9/22/00 -0700, Darryl Okahata wrote:
[ This is experimental, and thus is not (yet) being submitted to
xemacs-patches. ]
Here's an experimental patch for 21.2 that provides a way of
getting the window pixel co-ordinates of a window point. I found that
the function, "current-pixel-column", already existed, and so I just
added the corresponding function, "current-pixel-row".
However, there's a big "gotcha" (issue) with these functions: they
both use the redisplay tables to determine the pixel position. This
basically means that a screen update/refresh must be done (e.g.,
"(sit-for 0)") before these functions will return correct values. For
newly-created frames, you have to do something like this instead:
;; idea stolen from set-mouse-position
(while (not (frame-visible-p frame)) (sleep-for .5))
Unfortunately, there doesn't seem to be a better way.
I think the implementation is correct, its probably redisplay that needs
fixing.
andy
--------------------------------------------------------------
Dr Andy Piper
Principal Consultant, BEA Systems Ltd