Flush input events before destroying the window
This commit is contained in:
parent
f60c81af11
commit
9418a2a599
1 changed files with 3 additions and 0 deletions
|
@ -2819,6 +2819,9 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
|
||||||
case WM_DEVICECHANGE: {
|
case WM_DEVICECHANGE: {
|
||||||
joypad->probe_joypads();
|
joypad->probe_joypads();
|
||||||
} break;
|
} break;
|
||||||
|
case WM_DESTROY: {
|
||||||
|
Input::get_singleton()->flush_buffered_events();
|
||||||
|
} break;
|
||||||
case WM_SETCURSOR: {
|
case WM_SETCURSOR: {
|
||||||
if (LOWORD(lParam) == HTCLIENT) {
|
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)) {
|
if (windows[window_id].window_has_focus && (mouse_mode == MOUSE_MODE_HIDDEN || mouse_mode == MOUSE_MODE_CAPTURED || mouse_mode == MOUSE_MODE_CONFINED_HIDDEN)) {
|
||||||
|
|
Loading…
Reference in a new issue