Skip to content

Commit

Permalink
Merge pull request #95526 from alvinhochun/fix-pr94706
Browse files Browse the repository at this point in the history
DisplayServerWindows: Fix logic when creating with transient parent
  • Loading branch information
akien-mga authored Aug 14, 2024
2 parents 8e666ad + 16a563b commit f27724e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5391,13 +5391,15 @@ DisplayServer::WindowID DisplayServerWindows::_create_window(WindowMode p_mode,
{
WindowData *wd_transient_parent = nullptr;
HWND owner_hwnd = nullptr;
if (p_transient_parent != INVALID_WINDOW_ID && !windows.has(p_transient_parent)) {
ERR_PRINT("Condition \"!windows.has(p_transient_parent)\" is true.");
p_transient_parent = INVALID_WINDOW_ID;
} else {
wd_transient_parent = &windows[p_transient_parent];
if (p_exclusive) {
owner_hwnd = wd_transient_parent->hWnd;
if (p_transient_parent != INVALID_WINDOW_ID) {
if (!windows.has(p_transient_parent)) {
ERR_PRINT("Condition \"!windows.has(p_transient_parent)\" is true.");
p_transient_parent = INVALID_WINDOW_ID;
} else {
wd_transient_parent = &windows[p_transient_parent];
if (p_exclusive) {
owner_hwnd = wd_transient_parent->hWnd;
}
}
}

Expand Down

0 comments on commit f27724e

Please sign in to comment.