mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1187724 Don't dispatch KeyboardEvents when the target of WM_APPCOMMAND is a windowed plug-in for preventing deadlock r=jimm
This commit is contained in:
parent
6cfdf70c9e
commit
9bea7f371d
@ -1296,6 +1296,14 @@ NativeKey::HandleAppCommandMessage() const
|
||||
// This allow web applications to provide better UX for multimedia keyboard
|
||||
// users.
|
||||
bool dispatchKeyEvent = (GET_DEVICE_LPARAM(mMsg.lParam) == FAPPCOMMAND_KEY);
|
||||
if (dispatchKeyEvent) {
|
||||
// If a plug-in window has focus but it didn't consume the message, our
|
||||
// window receive WM_APPCOMMAND message. In this case, we shouldn't
|
||||
// dispatch KeyboardEvents because an event handler may access the
|
||||
// plug-in process synchronously.
|
||||
dispatchKeyEvent =
|
||||
WinUtils::IsOurProcessWindow(reinterpret_cast<HWND>(mMsg.wParam));
|
||||
}
|
||||
|
||||
bool consumed = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user