Fix the bell sound when Alt+key is pressed. (#1006)

This commit is contained in:
Mike Griese 2019-05-24 16:43:46 -05:00 committed by GitHub
parent 42e87ed3e3
commit 80f107965d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -162,6 +162,13 @@ LRESULT IslandWindow::MessageHandler(UINT const message, WPARAM const wparam, LP
return 0; // eat the message
}
}
case WM_MENUCHAR:
{
// GH#891: return this LRESULT here to prevent the app from making a
// bell when alt+key is pressed. A menu is active and the user presses a
// key that does not correspond to any mnemonic or accelerator key,
return MAKELRESULT(0, MNC_CLOSE);
}
}
// TODO: handle messages here...