Bug 385168 - Changing input locale leads to sticky ALT key

p=Dainis Jonitis <jonitis@gmail.com>
r=ere, sr=roc
This commit is contained in:
asqueella@gmail.com 2007-07-23 18:34:13 -07:00
Родитель cb5ac9d2d1
Коммит d9beafc5c3
1 изменённых файлов: 3 добавлений и 7 удалений

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

@ -329,6 +329,7 @@ void KeyboardLayout::LoadLayout ()
#ifndef WINCE
PRUint32 shiftState;
BYTE kbdState [256];
BYTE originalKbdState [256];
PRUint16 shiftStatesWithDeadKeys = 0; // Bitfield with all shift states that have at least one dead-key.
PRUint16 shiftStatesWithBaseChars = 0; // Bitfield with all shift states that produce any possible dead-key base characters.
@ -340,9 +341,7 @@ void KeyboardLayout::LoadLayout ()
ReleaseDeadKeyTables ();
#ifndef DEBUG
PRBool keyboardInputAlreadyBlocked = !::BlockInput (PR_TRUE);
#endif
::GetKeyboardState (originalKbdState);
// For each shift state gather all printable characters that are produced
// for normal case when no any dead-key is active.
@ -417,10 +416,7 @@ void KeyboardLayout::LoadLayout ()
}
}
#ifndef DEBUG
if (!keyboardInputAlreadyBlocked)
::BlockInput (PR_FALSE);
#endif
::SetKeyboardState (originalKbdState);
#endif
}