mac: Add win.setParentWindow(parent) API
This commit is contained in:
parent
e4d30ccfc3
commit
fd42e3dc84
7 changed files with 22 additions and 0 deletions
|
@ -911,6 +911,16 @@ bool NativeWindowMac::HasModalDialog() {
|
|||
return [window_ attachedSheet] != nil;
|
||||
}
|
||||
|
||||
void NativeWindowMac::SetParentWindow(NativeWindow* parent) {
|
||||
// Remove current parent window.
|
||||
if ([window_ parentWindow])
|
||||
[[window_ parentWindow] removeChildWindow:window_];
|
||||
|
||||
// Set new current window.
|
||||
if (parent)
|
||||
[parent->GetNativeWindow() addChildWindow:window_ ordered:NSWindowAbove];
|
||||
}
|
||||
|
||||
gfx::NativeWindow NativeWindowMac::GetNativeWindow() {
|
||||
return window_;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue