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||10,861||
Sep 30, 2011 07:29 AM
Last Post: @iOS_blog
|Detecting OS and Mac version||xiotex||2||3,720||
Nov 14, 2009 03:02 PM
Last Post: xiotex
|Window focus events in Cocoa||Jar445||2||6,713||
Jan 18, 2009 06:02 PM
Last Post: Jar445
|No window focus in Carbon app on 10.5||withnail||3||4,539||
Jan 9, 2008 02:25 PM
Last Post: OneSadCookie
|Mouse events for an openGL window||majestik666||5||8,259||
Jul 5, 2005 06:15 PM
Last Post: majestik666