always send keyboard events

pull/1/head
Heiko Hund 12 years ago
parent 47cff87477
commit bc015578d5

@ -191,13 +191,9 @@ ForceForegroundWindow(HWND hWnd)
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
if ((GetKeyState(VK_MENU) & 0x8000) == 0) keybd_event(VK_MENU, 0, 0, 0);
keybd_event(VK_MENU, 0, 0, 0);
ret = SetForegroundWindow(hWnd); ret = SetForegroundWindow(hWnd);
keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
if (GetKeyState(VK_MENU) & 0x8000)
keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);
return ret; return ret;
} }

Loading…
Cancel
Save