kwicher
kwicher

Reputation: 2082

NSWindow - Deactivate on Hide - isVisible

I have an NSWindow with a "Hide on deactivate" set to TRUE.

When my application looses focus, the window disappears, however, testing that by "isVisible" gives TRUE. What is going on?

Upvotes: 3

Views: 1610

Answers (1)

UJey
UJey

Reputation: 1442

isVisible == YES means that your window is still present on the screen or miniaturized to Dock.

Well, I never used this option before... But, if you really want to hide the window when your app loses focus, implement -applicationDidResignActive: method of NSApplicationDelegate and call -orderOut: for your window.

That will give you a stable result.

Upvotes: 3

Related Questions