Fix child windows may reside on other layers than parent.

Child windows should reside on the same layer as parent.
This commit is contained in:
Ilya Kulakov
2013-04-20 21:08:32 +07:00
parent 60f79bdf63
commit 8e4f1fdd10
+2 -1
View File
@@ -1413,7 +1413,8 @@ var resizeTimer = nil;
// Grab the appropriate level for the layer, and create it if
// necessary (if we are not simply removing the window).
var layer = [self layerAtLevel:[aWindow level] create:orderingMode !== CPWindowOut];
var layer = [self layerAtLevel:[[self _furthestParentOf:aWindow] level]
create:orderingMode !== CPWindowOut];
// When ordering out, ignore otherWindow, simply remove aWindow from its level.
// If layer is nil, this will be a no-op.