winemac: Make -setMacDrvParentWindow: do nothing if new parent is same as latent parent.

This commit is contained in:
Ken Thomases 2013-08-30 00:00:46 -05:00 committed by Alexandre Julliard
parent 4b2f4eb600
commit 6873c3ee66
1 changed files with 2 additions and 1 deletions

View File

@ -949,7 +949,8 @@ - (BOOL) setFrameIfOnScreen:(NSRect)contentRect
- (void) setMacDrvParentWindow:(WineWindow*)parent - (void) setMacDrvParentWindow:(WineWindow*)parent
{ {
if ([self parentWindow] != parent) WineWindow* oldParent = (WineWindow*)[self parentWindow];
if ((oldParent && oldParent != parent) || (!oldParent && latentParentWindow != parent))
{ {
[[self parentWindow] removeChildWindow:self]; [[self parentWindow] removeChildWindow:self];
self.latentParentWindow = nil; self.latentParentWindow = nil;