Fix NOTIFICATION_WM_CLOSE_REQUEST in Embedded Floating Window

This commit is contained in:
Hilderin
2025-01-21 19:12:27 -05:00
parent a7146ef807
commit 9eed43d429
6 changed files with 53 additions and 15 deletions

View File

@ -2975,6 +2975,9 @@ Error DisplayServerWindows::remove_embedded_process(OS::ProcessID p_pid) {
EmbeddedProcessData *ep = embedded_processes.get(p_pid);
// Send a close message to gracefully close the process.
PostMessage(ep->window_handle, WM_CLOSE, 0, 0);
// This is a workaround to ensure the parent window correctly regains focus after the
// embedded window is closed. When the embedded window is closed while it has focus,
// the parent window (the editor) does not become active. It appears focused but is not truly activated.