Merge pull request #102247 from Hilderin/fix-embedded-game-modal-dialog

Fix Modal Dialog with Embedded Game
This commit is contained in:
Rémi Verschelde
2025-02-12 11:21:01 +01:00
3 changed files with 68 additions and 29 deletions

View File

@@ -2986,7 +2986,8 @@ Error DisplayServerWindows::embed_process(WindowID p_window, OS::ProcessID p_pid
// (e.g., a screen to the left of the main screen).
const Rect2i adjusted_rect = Rect2i(p_rect.position + _get_screens_origin(), p_rect.size);
SetWindowPos(ep->window_handle, nullptr, adjusted_rect.position.x, adjusted_rect.position.y, adjusted_rect.size.x, adjusted_rect.size.y, SWP_NOZORDER | SWP_NOACTIVATE | SWP_ASYNCWINDOWPOS);
// Use HWND_BOTTOM to prevent reordering of the embedded window over another popup.
SetWindowPos(ep->window_handle, HWND_BOTTOM, adjusted_rect.position.x, adjusted_rect.position.y, adjusted_rect.size.x, adjusted_rect.size.y, SWP_NOZORDER | SWP_NOACTIVATE | SWP_ASYNCWINDOWPOS);
if (ep->is_visible != p_visible) {
if (p_visible) {