diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-14 19:54:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-14 19:54:39 +0100 |
commit | 4a22eca9a1d017146118f1220e184fbdfb85f8b6 (patch) | |
tree | be731f59061a42ec1454436f3ee2ebc60dc0df8e | |
parent | 66c9002dab717a2fdd9f796f73c5bd48e976f64b (diff) | |
parent | 9418a2a599e74eeddf7ac9aa1c114ac9b0526e71 (diff) |
Merge pull request #56788 from Chaosus/fix_input_process
Flush input events before destroying the window
-rw-r--r-- | platform/windows/display_server_windows.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 091bed36ea..9160371b5f 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -2819,6 +2819,9 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA case WM_DEVICECHANGE: { joypad->probe_joypads(); } break; + case WM_DESTROY: { + Input::get_singleton()->flush_buffered_events(); + } break; case WM_SETCURSOR: { if (LOWORD(lParam) == HTCLIENT) { if (windows[window_id].window_has_focus && (mouse_mode == MOUSE_MODE_HIDDEN || mouse_mode == MOUSE_MODE_CAPTURED || mouse_mode == MOUSE_MODE_CONFINED_HIDDEN)) { |