mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 975383 part.4 Remove compositionupdate dispatchers in nsGtkIMModule of GTK r=karlt
This commit is contained in:
parent
5c2ec48f6d
commit
fd4d807e05
@ -1092,21 +1092,6 @@ nsGtkIMModule::DispatchTextEvent(const nsAString &aCompositionString,
|
||||
nsEventStatus status;
|
||||
nsRefPtr<nsWindow> lastFocusedWindow = mLastFocusedWindow;
|
||||
|
||||
if (aCompositionString != mDispatchedCompositionString) {
|
||||
WidgetCompositionEvent compositionUpdate(true, NS_COMPOSITION_UPDATE,
|
||||
mLastFocusedWindow);
|
||||
InitEvent(compositionUpdate);
|
||||
compositionUpdate.data = aCompositionString;
|
||||
mDispatchedCompositionString = aCompositionString;
|
||||
mLastFocusedWindow->DispatchEvent(&compositionUpdate, status);
|
||||
if (lastFocusedWindow->IsDestroyed() ||
|
||||
lastFocusedWindow != mLastFocusedWindow) {
|
||||
PR_LOG(gGtkIMLog, PR_LOG_ALWAYS,
|
||||
(" NOTE, the focused widget was destroyed/changed by compositionupdate"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Store the selected string which will be removed by following text event.
|
||||
if (mCompositionState == eCompositionState_CompositionStartDispatched) {
|
||||
// XXX We should assume, for now, any web applications don't change
|
||||
@ -1126,6 +1111,8 @@ nsGtkIMModule::DispatchTextEvent(const nsAString &aCompositionString,
|
||||
|
||||
uint32_t targetOffset = mCompositionStart;
|
||||
|
||||
textEvent.theText = mDispatchedCompositionString = aCompositionString;
|
||||
|
||||
if (!aIsCommit) {
|
||||
// NOTE: SetTextRangeList() assumes that mDispatchedCompositionString
|
||||
// has been updated already.
|
||||
@ -1133,8 +1120,6 @@ nsGtkIMModule::DispatchTextEvent(const nsAString &aCompositionString,
|
||||
targetOffset += textEvent.mRanges->TargetClauseOffset();
|
||||
}
|
||||
|
||||
textEvent.theText = mDispatchedCompositionString.get();
|
||||
|
||||
mCompositionState = aIsCommit ?
|
||||
eCompositionState_CommitTextEventDispatched :
|
||||
eCompositionState_TextEventDispatched;
|
||||
|
Loading…
Reference in New Issue
Block a user