Fix enter/escape crashes on Windows (#202)
* Do not let slip through IDOK and IDCANCEL as menu events, fixes #55 * Add comment about IDOK and IDCANCEL
This commit is contained in:
parent
5fa7ba487e
commit
ee87a9db23
|
@ -87,7 +87,8 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
|
||||||
// not a menu
|
// not a menu
|
||||||
if (lParam != 0)
|
if (lParam != 0)
|
||||||
break;
|
break;
|
||||||
if (HIWORD(wParam) != 0)
|
// IDOK (1) and IDCANCEL (2) aren't menu events either
|
||||||
|
if (HIWORD(wParam) != 0 || LOWORD(wParam) <= IDCANCEL)
|
||||||
break;
|
break;
|
||||||
runMenuEvent(LOWORD(wParam), uiWindow(w));
|
runMenuEvent(LOWORD(wParam), uiWindow(w));
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue