summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-14 19:54:39 +0100
committerGitHub <noreply@github.com>2022-01-14 19:54:39 +0100
commit4a22eca9a1d017146118f1220e184fbdfb85f8b6 (patch)
treebe731f59061a42ec1454436f3ee2ebc60dc0df8e /platform
parent66c9002dab717a2fdd9f796f73c5bd48e976f64b (diff)
parent9418a2a599e74eeddf7ac9aa1c114ac9b0526e71 (diff)
Merge pull request #56788 from Chaosus/fix_input_process
Flush input events before destroying the window
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/display_server_windows.cpp3
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)) {