Detecting window focus events
I have a window (in Cocoa) and I need to be able to tell when it is hidden/shown, is minimized/unminimized, and looses/gains focus. Strangely, I can't seem to find any documentation that says how to do this.
You can observe the relevant notifications (listed in the section at the bottom of the NSWindow docs), or you can subclass the window and override the relevant methods (e.g. becomeKeyWindow).
Possibly Related Threads...
|detecting 2 touches, is order of touch significant?||sefiroths||4||9,983||
Sep 30, 2011 07:29 AM
Last Post: @iOS_blog
|Detecting OS and Mac version||xiotex||2||3,106||
Nov 14, 2009 03:02 PM
Last Post: xiotex
|Window focus events in Cocoa||Jar445||2||5,423||
Jan 18, 2009 06:02 PM
Last Post: Jar445
|No window focus in Carbon app on 10.5||withnail||3||3,922||
Jan 9, 2008 02:25 PM
Last Post: OneSadCookie
|Mouse events for an openGL window||majestik666||5||7,483||
Jul 5, 2005 06:15 PM
Last Post: majestik666