зеркало из https://github.com/mozilla/pjs.git
Fix for 17419. a=bobj@netscape.com, r=ftang@netscape.com
This commit is contained in:
Родитель
c2aa79caad
Коммит
83c77e34b0
|
@ -469,6 +469,9 @@ nsEditor::PostCreate()
|
|||
NotifyDocumentListeners(eDocumentCreated);
|
||||
NotifyDocumentListeners(eDocumentStateChanged);
|
||||
|
||||
// Call ResetInputState() for initialization
|
||||
ForceCompositionEnd();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -469,6 +469,9 @@ nsEditor::PostCreate()
|
|||
NotifyDocumentListeners(eDocumentCreated);
|
||||
NotifyDocumentListeners(eDocumentStateChanged);
|
||||
|
||||
// Call ResetInputState() for initialization
|
||||
ForceCompositionEnd();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -278,6 +278,7 @@ nsWidget::nsWidget()
|
|||
mXIC = 0;
|
||||
|
||||
mIMEShellWidget = 0;
|
||||
mIMEChildWidget = 0;
|
||||
mIMECallComposeStart = PR_FALSE;
|
||||
mIMECallComposeEnd = PR_TRUE;
|
||||
|
||||
|
@ -2732,6 +2733,12 @@ nsWidget::GetXIC()
|
|||
mXIC->SetPreeditSpotLocation(0, mXICFontSize);
|
||||
}
|
||||
}
|
||||
if (mXIC) {
|
||||
nsWidget* parent = (nsWidget*)mParent.get();
|
||||
if (parent) {
|
||||
parent->mIMEChildWidget = this;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif // USE_XIM
|
||||
|
@ -3189,10 +3196,11 @@ nsWidget::IMESetFocusWidget()
|
|||
PrimeICSpotTimer();
|
||||
}
|
||||
} else {
|
||||
// FIXME: we shouldn't call UnsetFocusWidget() when focus
|
||||
// is moved to toolbar or SetFocusWidget() again to
|
||||
// input Widget (bug 17419)
|
||||
|
||||
if (mIMEChildWidget) {
|
||||
IMEActivateWidget();
|
||||
mIMEChildWidget->IMESetFocusWidget();
|
||||
return;
|
||||
}
|
||||
// kinput2 does not work well if we call UnsetFocusWidget()
|
||||
// when mIMEIsDeactivating is true
|
||||
if (mIMEShellWidget->mIMEIsDeactivating == PR_FALSE) {
|
||||
|
|
|
@ -364,6 +364,7 @@ public:
|
|||
void IMEDeactivateWidget();
|
||||
void IMEActivateWidget();
|
||||
void IMEDestroyIC();
|
||||
nsWidget* mIMEChildWidget;
|
||||
#endif // USE_XIM
|
||||
protected:
|
||||
void IMEComposeStart(guint aTime);
|
||||
|
|
Загрузка…
Ссылка в новой задаче