winemac: When a window becomes ineligible to be a parent, make the relationship latent in its children, too.

This commit is contained in:
Ken Thomases 2013-08-30 00:00:53 -05:00 committed by Alexandre Julliard
parent 029bcf97dd
commit a68d0a24ef
1 changed files with 12 additions and 0 deletions

View File

@ -712,11 +712,23 @@ - (BOOL) becameEligibleParentOrChild
- (void) becameIneligibleParentOrChild - (void) becameIneligibleParentOrChild
{ {
WineWindow* parent = (WineWindow*)[self parentWindow]; WineWindow* parent = (WineWindow*)[self parentWindow];
NSArray* childWindows = [self childWindows];
if (parent) if (parent)
{ {
self.latentParentWindow = parent; self.latentParentWindow = parent;
[parent removeChildWindow:self]; [parent removeChildWindow:self];
} }
if ([childWindows count])
{
WineWindow* child;
for (child in [[childWindows copy] autorelease])
{
child.latentParentWindow = self;
[self removeChildWindow:child];
}
}
} }
// Determine if, among Wine windows, this window is directly above or below // Determine if, among Wine windows, this window is directly above or below