[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding the window under a point

>I need to know the window under a point. I can't use
>find-view-containing-point as I don't have a view to pass it. I could
>use #_FindWindow but how do you convert from the returned wptr to an
I think you'd have to cycle through all the windows for the matching wptr.
>MCL window instance? Alternatively I could just cycle through
>(windows) and return the first that answers point-in-rect-p using its
Actually this is how I do it, and it's not so bad.  You seldom have more
than a half-dozen visible windows to look at.  (I don't even use its
PortRect, I just use its position and size.)

A wild suggestion with (possibly) no basis in reality is to try calling
find-view-containing-point and pass in nil as the view.  Various view
functions accept nil as a substitute value for the WindowManager, and this
might be a "super view" to all windows.

"TANSTAAFL" Rich lynch@aristotle.ils.nwu.edu