I’ve created a Window which contains a child Window.
After i close the Main Window with Cmd + W (thus, losing the main/key window status) whenever i try to reopen it with Cmd + Tab, only the child window went displayed… not the main one.
Cmd + W command is bindend to First Responder -> performClose: as usual… and the child window is added to the main window with:
[window addChildWindow:childWindow ordered:NSWindowAbove];
Why the child window is still visible after Alt + Tab ?
—Edit: I create this function that seems to resolve my situation .. but i’m not sure this is the right way:
-(IBAction)closeWindows:(id)sender{
[[self window]close];
NSArray *childWin = [[self window]childWindows];
for(NSWindow *win in childWin){
[win close];
}
}
This functions works for me: