I have a custom nsview which draw his background with drawrect (and a gradient) and CALayers to draw other part of the UI
I put it in an NSWindow with want core animation layer set to yes for the contentview and each custom view.
I am trying to draw the gradient background with a blue color when the window is the key window and with a black color if not.
Is there any reason for the nswindow to return NO to [[self window] isKeyWindow] in the custom view because of core animation or the layers ?? (the NSWindow return NO event if there is only one window opened)