Bug 981963 Ignore following char message if its wParam is 0 r=jimm

This commit is contained in:
Masayuki Nakano 2014-03-20 22:52:27 +09:00
Родитель 1b7c64aef6
Коммит 2326c13b18
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -1447,6 +1447,13 @@ NativeKey::GetFollowingCharMessage(MSG& aCharMsg) const
continue;
}
// Typically, this case occurs with WM_DEADCHAR. If the removed message's
// wParam becomes 0, that means that the key event shouldn't cause text
// input. So, let's ignore the strange char message.
if (removedMsg.message == nextKeyMsg.message && !removedMsg.wParam) {
return false;
}
// NOTE: Although, we don't know when this case occurs, the scan code value
// in lParam may be changed from 0 to something. The changed value
// is different from the scan code of handling keydown message.