Only filter keyboard events to ensure Esc still works when mouse lock is disabled

This commit is contained in:
Cameron Gutman 2016-05-06 14:51:43 -04:00
parent 474c0c05e1
commit f0b8604147

View File

@ -38,7 +38,12 @@ void MoonlightInstance::OnConnectionStarted(uint32_t unused) {
PostMessage(response); PostMessage(response);
// Start receiving input events // Start receiving input events
RequestInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD | PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL); RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL);
// Filtering is suboptimal but it ensures that we can pass keyboard events
// to the browser when mouse lock is disabled. This is neccessary for Esc
// to kick the app out of full-screen.
RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD);
} }
void MoonlightInstance::OnConnectionStopped(uint32_t error) { void MoonlightInstance::OnConnectionStopped(uint32_t error) {