Question

I want to make a fullscreen app that shows the background of the new space, in addition to having normal window behavior. Basically, when the user goes full screen, I want every NSWindow in the app to stay the same size, stay in the same position of the screen, but move to the new space. Is this possible? If so, where is the documentation for that kind of behavior?

EDIT: I know this is now quite old, but I have just discovered customWindowsToEnterFullScreenForWindow. I have used it to solve the problem. The code is below, just incase anyone else is interested in doing this too.

- (NSArray*) customWindowsToEnterFullScreenForWindow:(NSWindow*)window {
    if ([window isEqualTo:self.window]) {
        return [NSArray arrayWithObjects:window, otherwindow, nil];
    }

    return nil;
}

- (NSArray*) customWindowsToExitFullScreenForWindow:(NSWindow*)window {
    if ([window isEqualTo:self.window]) {
        return [NSArray arrayWithObjects:window, otherwindow, nil];
    }

    return nil;
}

These are NSWindowDelegate methods though, so be sure to set the window's delegate. Otherwise, it may cause some confusion.

Was it helpful?

Solution

An app can only be on one space at a time. This is a hard limitation. You should file a bug if you want to be able to manage multiple windows on multiple spaces in fullscreen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top