tags:

views:

22

answers:

1

My program needs to observe changing in windows order and position. Like when some window gets above another or moves somewhere. Could it be performed with Cocoa (Window Services, Notification API)?

A: 

Do these windows belong to your app?

If so then just register for the following notifications: NSWindowDidBecomeMainNotification NSWindowDidResignMainNotification NSWindowDidMoveNotification NSWindowDidResizeNotification

If the windows don't belong to your app then you might have to use a timer.

Leibowitzn