Skip to content

Commit

Permalink
fix: child window alwaysOnTop level
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jun 21, 2021
1 parent 507cbdc commit 44cbc42
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shell/browser/native_window_mac.mm
Expand Up @@ -1805,10 +1805,15 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {

// Set new parent window.
// Note that this method will force the window to become visible.
if (parent && attach)
if (parent && attach) {
// Attaching a window as a child window resets its window level, so
// save and restore it afterwards.
NSInteger level = window_.level;
[parent->GetNativeWindow().GetNativeNSWindow()
addChildWindow:window_
ordered:NSWindowAbove];
[window_ setLevel:level];
}
}

void NativeWindowMac::SetForwardMouseMessages(bool forward) {
Expand Down

0 comments on commit 44cbc42

Please sign in to comment.