author | Masayuki Nakano <masayuki@d-toybox.com> |
Sat, 27 Oct 2012 08:35:21 +0900 | |
changeset 111584 | 6e748a6c7216b23ffe9122abc6627b185e373547 |
parent 111583 | 8d2392ef0082135f2faad84c7a6e00fdb935212c |
child 111585 | 80bb0b88086f6b271abb014e57fe2d3920e094cb |
push id | 23756 |
push user | ryanvm@gmail.com |
push date | Sat, 27 Oct 2012 20:39:25 +0000 |
treeherder | mozilla-central@c5428231b6f7 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | karlt |
bugs | 801989 |
milestone | 19.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
widget/gtk2/nsWindow.cpp | file | annotate | diff | comparison | revisions | |
widget/qt/nsWindow.cpp | file | annotate | diff | comparison | revisions |
--- a/widget/gtk2/nsWindow.cpp +++ b/widget/gtk2/nsWindow.cpp @@ -5902,18 +5902,23 @@ nsWindow::SetInputContext(const InputCon NS_IMETHODIMP_(InputContext) nsWindow::GetInputContext() { InputContext context; if (!mIMModule) { context.mIMEState.mEnabled = IMEState::DISABLED; context.mIMEState.mOpen = IMEState::OPEN_STATE_NOT_SUPPORTED; + // If IME context isn't available on this widget, we should set |this| + // instead of nullptr since nullptr means that the platform has only one + // context per process. + context.mNativeIMEContext = this; } else { context = mIMModule->GetInputContext(); + context.mNativeIMEContext = mIMModule; } return context; } NS_IMETHODIMP nsWindow::CancelIMEComposition() { return mIMModule ? mIMModule->CancelIMEComposition(this) : NS_OK;
--- a/widget/qt/nsWindow.cpp +++ b/widget/qt/nsWindow.cpp @@ -3184,16 +3184,19 @@ nsWindow::SetInputContext(const InputCon break; } } NS_IMETHODIMP_(InputContext) nsWindow::GetInputContext() { mInputContext.mIMEState.mOpen = IMEState::OPEN_STATE_NOT_SUPPORTED; + // Our qt widget looks like using only one context per process. + // However, it's better to set the context's pointer. + mInputContext.mNativeIMEContext = qApp->inputContext(); return mInputContext; } void nsWindow::SetSoftwareKeyboardState(bool aOpen, const InputContextAction& aAction) { if (aOpen) {