зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1213845 - enable osk support on windows 8, but hide it behind a preference, r=jaws
--HG-- extra : commitid : HGvNNv1htDF extra : rebase_source : 7c39d7903bfda6040a202d6784c5a4e469a7eeed extra : amend_source : af5a54a5fe9f3120c30dfe6ac3b607da596364e9
This commit is contained in:
Родитель
a9af7b7120
Коммит
e182a0c49c
|
@ -3268,9 +3268,9 @@ pref("ui.osk.enabled", true);
|
|||
pref("ui.osk.detect_physical_keyboard", true);
|
||||
// Path to TabTip.exe on local machine. Cached for performance reasons.
|
||||
pref("ui.osk.on_screen_keyboard_path", "");
|
||||
// Only show the on-screen keyboard when Windows is in Tablet mode. Setting
|
||||
// this pref to false will allow the OSK to show in regular non-tablet mode.
|
||||
pref("ui.osk.require_tablet_mode", true);
|
||||
// Only try to show the on-screen keyboard on Windows 10 and later. Setting
|
||||
// this pref to false will allow the OSK to show on Windows 8 and 8.1.
|
||||
pref("ui.osk.require_win10", false);
|
||||
// This pref stores the "reason" that the on-screen keyboard was either
|
||||
// shown or not shown when focus is moved to an editable text field. It is
|
||||
// used to help debug why the keyboard is either not appearing when expected
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
const char* kOskPathPrefName = "ui.osk.on_screen_keyboard_path";
|
||||
const char* kOskEnabled = "ui.osk.enabled";
|
||||
const char* kOskDetectPhysicalKeyboard = "ui.osk.detect_physical_keyboard";
|
||||
const char* kOskRequireTabletMode = "ui.osk.require_tablet_mode";
|
||||
const char* kOskRequireWin10 = "ui.osk.require_win10";
|
||||
const char* kOskDebugReason = "ui.osk.debug.keyboardDisplayReason";
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -539,21 +539,22 @@ void
|
|||
IMEHandler::MaybeShowOnScreenKeyboard()
|
||||
{
|
||||
if (sPluginHasFocus ||
|
||||
!IsWin10OrLater() ||
|
||||
!IsWin8OrLater() ||
|
||||
!Preferences::GetBool(kOskEnabled, true) ||
|
||||
sShowingOnScreenKeyboard ||
|
||||
IMEHandler::IsKeyboardPresentOnSlate()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Tablet Mode is only supported on Windows 10 and higher.
|
||||
// When touch-event detection within IME is better supported
|
||||
// this check may be removed, and ShowOnScreenKeyboard can
|
||||
// run on Windows 8 and higher (adjusting the IsWin10OrLater
|
||||
// guard above and within MaybeDismissOnScreenKeyboard).
|
||||
if (!IsInTabletMode() &&
|
||||
Preferences::GetBool(kOskRequireTabletMode, true) &&
|
||||
!AutoInvokeOnScreenKeyboardInDesktopMode()) {
|
||||
// On Windows 10 we require tablet mode, unless the user has set the relevant
|
||||
// Windows setting to enable the on-screen keyboard in desktop mode.
|
||||
// We might be disabled specifically on Win8(.1), so we check that afterwards.
|
||||
if (IsWin10OrLater()) {
|
||||
if (!IsInTabletMode() && !AutoInvokeOnScreenKeyboardInDesktopMode()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (Preferences::GetBool(kOskRequireWin10, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -565,7 +566,7 @@ void
|
|||
IMEHandler::MaybeDismissOnScreenKeyboard()
|
||||
{
|
||||
if (sPluginHasFocus ||
|
||||
!IsWin10OrLater() ||
|
||||
!IsWin8OrLater() ||
|
||||
!sShowingOnScreenKeyboard) {
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче