I could not get too much response to work. What I ended up was subclassing NSWindow and then overriding constrainFrameRect: toScreen :. This will automatically open a new window on the "main screen" of the application.
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen
{
AppDelegate *delegate = [[NSApplication sharedApplication] delegate];
return [super constrainFrameRect:frameRect toScreen:delegate.window.screen];
}
xizor source
share