Reputation: 12293
I am new to Mac API. I can get the list of window from the following function.
NSArray *windowInfos = (__bridge_transfer NSArray*)CGWindowListCopyWindowInfo(kCGWindowListOptionAll, kCGNullWindowID);
Is it possible to make a window on screen if the window is not on screen. If so, How can I do that?
Thanks in advance
Upvotes: 0
Views: 69
Reputation: 2117
Does the window you are trying to make visible belong to your application? If so, you more likely to just want to do something like [myWindow makeKeyAndOrderFront:nil]
, where myWindow
is an NSWindow*
outlet connected to a window in a nib file in your app. Or does the window you are trying to make visible belong to a different application? If so, it would seem rather strange to be trying to control the visibility of windows in a different app; perhaps in that case you could be more specific about what exactly you are trying to achieve, and perhaps there would be a better mechanism (distributed notifications, for example) to achieve it.
Upvotes: 1