Bug 962920 nsTextStore should commit composition when WM_ENTERIDLE is received r=jimm
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 11 Jul 2014 13:12:36 +0900
changeset 193528 7d98395828c7ae2711d9bcb94eb1d7361947d8b9
parent 193527 17cd99be695f4cc7534a98c9aab6fd8195c2757e
child 193529 106cb7c6591ac9389e38236725d70108461e8097
push id27123
push userryanvm@gmail.com
push dateFri, 11 Jul 2014 20:35:05 +0000
treeherdermozilla-central@84bd8d9f4256 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs962920
milestone33.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
Bug 962920 nsTextStore should commit composition when WM_ENTERIDLE is received r=jimm
widget/windows/nsTextStore.cpp
--- a/widget/windows/nsTextStore.cpp
+++ b/widget/windows/nsTextStore.cpp
@@ -3946,16 +3946,24 @@ nsTextStore::ProcessMessage(nsWindowBase
       // window was set the position.  After that, even in TSF mode, WinXP keeps
       // to use composition window at the position if the active IME is not
       // aware TSF.  For avoiding this issue, we need to hide the composition
       // window here.
       if (aWParam) {
         aLParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
       }
       break;
+    case WM_ENTERIDLE:
+      // When an modal dialog such as a file picker is open, composition
+      // should be committed because IME might be used on it.
+      if (!IsComposingOn(aWindow)) {
+        break;
+      }
+      CommitComposition(false);
+      break;
   }
 }
 
 /******************************************************************/
 /* nsTextStore::Composition                                       */
 /******************************************************************/
 
 void