How to obtain NSApplication from kCGWindowOwnerPID?

2008-08-08 Thread Stefan Hafeneger
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

Re: How to obtain NSApplication from kCGWindowOwnerPID?

2008-08-08 Thread David Duncan
On Aug 8, 2008, at 11:46 AM, Stefan Hafeneger wrote: 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

Re: How to obtain NSApplication from kCGWindowOwnerPID?

2008-08-08 Thread Stefan Hafeneger
Hi David, I would like to create my own low level events (since I can't attach custom data to a CGEvent struct) and pass them to the appropriate application. Since I can't access other processes I thought I could get somehow the PID of an application, send this PID via distributed objects