Skip to content

Commit

Permalink
Merge pull request #40232 from bruvzg/macos_transient
Browse files Browse the repository at this point in the history
[macOS] Fix transient windows.
  • Loading branch information
akien-mga authored Jul 9, 2020
2 parents 25858f3 + bcc3c72 commit c074350
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/osx/display_server_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,7 @@ static void displays_arrangement_changed(CGDirectDisplayID display_id, CGDisplay
wd_window.transient_parent = INVALID_WINDOW_ID;
wd_parent.transient_children.erase(p_window);

[wd_window.window_object setParentWindow:nil];
[wd_parent.window_object removeChildWindow:wd_window.window_object];
} else {
ERR_FAIL_COND(!windows.has(p_parent));
ERR_FAIL_COND_MSG(wd_window.transient_parent != INVALID_WINDOW_ID, "Window already has a transient parent");
Expand All @@ -2474,7 +2474,7 @@ static void displays_arrangement_changed(CGDirectDisplayID display_id, CGDisplay
wd_window.transient_parent = p_parent;
wd_parent.transient_children.insert(p_window);

[wd_window.window_object setParentWindow:wd_parent.window_object];
[wd_parent.window_object addChildWindow:wd_window.window_object ordered:NSWindowAbove];
}
}

Expand Down

0 comments on commit c074350

Please sign in to comment.