зеркало из https://github.com/mozilla/gecko-dev.git
Bug 899233 - Don't restart IME when changing selection; r=cpeterson
This commit is contained in:
Родитель
948c42d2f5
Коммит
e97edf2412
|
@ -48,6 +48,7 @@ interface GeckoEditableClient {
|
||||||
and also for the IC thread to listen to the Editable */
|
and also for the IC thread to listen to the Editable */
|
||||||
interface GeckoEditableListener {
|
interface GeckoEditableListener {
|
||||||
// IME notification type for notifyIME(), corresponding to NotificationToIME enum in Gecko
|
// IME notification type for notifyIME(), corresponding to NotificationToIME enum in Gecko
|
||||||
|
final int NOTIFY_IME_OPEN_VKB = -2;
|
||||||
final int NOTIFY_IME_REPLY_EVENT = -1;
|
final int NOTIFY_IME_REPLY_EVENT = -1;
|
||||||
final int NOTIFY_IME_OF_FOCUS = 1;
|
final int NOTIFY_IME_OF_FOCUS = 1;
|
||||||
final int NOTIFY_IME_OF_BLUR = 2;
|
final int NOTIFY_IME_OF_BLUR = 2;
|
||||||
|
|
|
@ -905,6 +905,10 @@ class GeckoInputConnection
|
||||||
resetInputConnection();
|
resetInputConnection();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NOTIFY_IME_OPEN_VKB:
|
||||||
|
showSoftInput();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
throw new IllegalArgumentException("Unexpected NOTIFY_IME=" + type);
|
throw new IllegalArgumentException("Unexpected NOTIFY_IME=" + type);
|
||||||
|
|
|
@ -126,6 +126,7 @@ public:
|
||||||
enum {
|
enum {
|
||||||
// Values for NotifyIME, in addition to values from the Gecko
|
// Values for NotifyIME, in addition to values from the Gecko
|
||||||
// NotificationToIME enum; use negative values here to prevent conflict
|
// NotificationToIME enum; use negative values here to prevent conflict
|
||||||
|
NOTIFY_IME_OPEN_VKB = -2,
|
||||||
NOTIFY_IME_REPLY_EVENT = -1,
|
NOTIFY_IME_REPLY_EVENT = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2198,6 +2198,12 @@ nsWindow::SetInputContext(const InputContext& aContext,
|
||||||
|
|
||||||
mInputContext.mIMEState.mEnabled = enabled;
|
mInputContext.mIMEState.mEnabled = enabled;
|
||||||
|
|
||||||
|
if (enabled == IMEState::ENABLED && aAction.UserMightRequestOpenVKB()) {
|
||||||
|
// Don't reset keyboard when we should simply open the vkb
|
||||||
|
AndroidBridge::NotifyIME(AndroidBridge::NOTIFY_IME_OPEN_VKB);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mIMEUpdatingContext) {
|
if (mIMEUpdatingContext) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче