How to obtain NSApplication from kCGWindowOwnerPID?
How to obtain NSApplication from kCGWindowOwnerPID?
- Subject: How to obtain NSApplication from kCGWindowOwnerPID?
- From: Stefan Hafeneger <email@hidden>
- Date: Fri, 08 Aug 2008 20:46:57 +0200
Hi,
I would like to figure out the NSWindow object for a screen location.
I could use CGWindowListCopyWindowInfo() to obtain a list of all
visible windows and consequently the bounds of each window, the
(window server's) window ID and the PID. I don't want to get a pointer
to the NSWindow or NSApplication object, but I would like to check for
a specific application if this window belongs to this application and
so get the NSWindow object. Since I already got low level information
about the window and process I don't want to iterate over all
NSWindows of NSApplication and do a hit test. Any ideas?
With best wishes, Stefan
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden