drop all keys when window no longer active (not jut loss of focus). Also drop all pending keys that haven't been sent to the ADB yet.

This commit is contained in:
Kelvin Sherlock 2019-02-07 23:09:53 -05:00
parent 2cde38ba3c
commit a76d26a0ad

View File

@ -302,8 +302,15 @@ LRESULT CALLBACK win_event_handler(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM l
DragFinish((HDROP)wParam);
break;
case WM_KILLFOCUS:
adb_all_keys_up(); // ALT-TAB doesn't send key-up messages
break;
nb_win32_key = 0;
adb_all_keys_up(); // ALT-TAB doesn't send key-up messages
break;
case WM_ACTIVATE:
if (wParam == WA_INACTIVE) {
nb_win32_key = 0;
adb_all_keys_up();
}
break;
}
switch(umsg) {
HANDLE_MSG(hwnd, WM_KEYUP, WIN_EVENT_KEY);