|
|
|
@ -90,11 +90,8 @@ HRESULT WindowImpl::SetParent(IAvnWindow *parent) { |
|
|
|
if(_parent != nullptr) |
|
|
|
{ |
|
|
|
_parent->_children.remove(this); |
|
|
|
auto parent = _parent; |
|
|
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{ |
|
|
|
parent->BringToFront(); |
|
|
|
}); |
|
|
|
_parent->BringToFront(); |
|
|
|
} |
|
|
|
|
|
|
|
auto cparent = dynamic_cast<WindowImpl *>(parent); |
|
|
|
@ -121,20 +118,23 @@ HRESULT WindowImpl::SetParent(IAvnWindow *parent) { |
|
|
|
|
|
|
|
void WindowImpl::BringToFront() |
|
|
|
{ |
|
|
|
if(IsDialog()) |
|
|
|
if(Window != nullptr) |
|
|
|
{ |
|
|
|
Activate(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
[Window orderFront:nullptr]; |
|
|
|
} |
|
|
|
|
|
|
|
[Window invalidateShadow]; |
|
|
|
|
|
|
|
for(auto iterator = _children.begin(); iterator != _children.end(); iterator++) |
|
|
|
{ |
|
|
|
(*iterator)->BringToFront(); |
|
|
|
if(IsDialog()) |
|
|
|
{ |
|
|
|
Activate(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
[Window orderFront:nullptr]; |
|
|
|
} |
|
|
|
|
|
|
|
[Window invalidateShadow]; |
|
|
|
|
|
|
|
for(auto iterator = _children.begin(); iterator != _children.end(); iterator++) |
|
|
|
{ |
|
|
|
(*iterator)->BringToFront(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|