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 215446 7d98395828c7ae2711d9bcb94eb1d7361947d8b9
parent 215445 17cd99be695f4cc7534a98c9aab6fd8195c2757e
child 215447 106cb7c6591ac9389e38236725d70108461e8097
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [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