diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index ccac5bf02..637c29e55 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -985,6 +985,7 @@ CPTexturedBackgroundWindowMask [_platformWindow moveWindow:self fromLevel:_level toLevel:aLevel]; _level = aLevel; + [_childWindows makeObjectsPerformSelector:@selector(setLevel:) withObject:_level]; if ([self _sharesChromeWithPlatformWindow]) [_platformWindow setLevel:aLevel]; @@ -2530,6 +2531,7 @@ CPTexturedBackgroundWindowMask [childWindow setParentWindow:self]; [childWindow _setChildOrdering:orderingMode]; + [childWindow setLevel:[self level]]; if ([self isVisible] && ![childWindow isVisible]) [childWindow orderWindow:orderingMode relativeTo:_windowNumber]; diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index 546c05871..3f861b5ec 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -1490,7 +1490,8 @@ var resizeTimer = nil; // relative to it or the furthest parent. var children = [aWindow childWindows], count = [children count], - parent = aWindow; + parent = aWindow, + parentLevel = [parent level]; for (var i = 0; i < count; ++i) { @@ -1501,6 +1502,10 @@ var resizeTimer = nil; if (!childWasVisible && ![child _hasBeenOrderedIn]) continue; + // If a user moved level of the child window, we should respect that + if ([child level] !== parentLevel) + continue; + var ordering = [child _childOrdering]; if ((ordering === CPWindowAbove && furthestParent._index > parent._index) ||