Possibly +[NSWindow windowNumberAtPoint:belowWindowWithWindowNumber:], but then 
you'd still need to loop through your windows to find the one with the matching 
windowNumber.
________________________________________
From: cocoa-dev-bounces+lrucker=vmware....@lists.apple.com 
[cocoa-dev-bounces+lrucker=vmware....@lists.apple.com] on behalf of Dave 
[d...@looktowindward.com]
Sent: Wednesday, April 22, 2015 1:56 PM
To: Cocoa Developers
Subject: Re: Converting to Window Coordinates

> On 22 Apr 2015, at 20:52, Lee Ann Rucker <lruc...@vmware.com> wrote:
>
>> Is hit testing the content view the only way to tell which window a point 
>> falls within? At the moment I loop though all windows until I find one which 
>> works, but is a bit inefficient.
>
> Since everything's in the same coordinate space now, use NSPointInRect on the 
> window frame.

Ok, but I still have to loop through my windows, there is no method I can call 
that will return the window for the point directly? e.g.

myWindow = [<something> getWindowForScreenPoint:thePoint);

it’s no big deal and I have it working already, it’s just if there is a system 
method then I may as well use it.

All the Best
Dave




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com

This email sent to lruc...@vmware.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to