Reputation:
A NSWindow can be hidden via orderOut:
or minimized.
How can I distinguish between the two? isVisible
returns 0 in both cases.
Upvotes: 3
Views: 1699
Reputation: 2282
If -isMiniaturized
isn't working for you, you can manually keep track of the window's miniaturization status by setting up your own status flag that you update when the window is minimized/de-minimized, using either of the following methods:
Set up a window delegate that implements windowDidMiniaturize:
& windowDidDeminiaturize:
Set up an observer for the window notifications, NSWindowDidMiniaturizeNotification
& NSWindowDidDeminiaturizeNotification
.
Upvotes: 4