Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6852429

IME should call ImmIsUIMessage() or DefWindowProc() when it receives WM_IME_SETCONTEX

XMLWordPrintable

    • b68
    • x86
    • windows_2003

      MSDN documant says,
      http://msdn.microsoft.com/en-us/library/dd374142(VS.85).aspx
      ---------------------------------------------------------------
      Remarks
        If the application has created an IME window,
        it should call ImmIsUIMessage.
        Otherwise, it should pass this message to DefWindowProc.
      ---------------------------------------------------------------

      This seems to say, "when IME receives WM_IME_SETCONTEXT, it should call either of
      ImmIsUIMessage() or DefWindowProc() ."

      Actual implementation in JDK5/JDK6u14/JDK7 (for Windows) handles the case of WM_IME_SETCONTEXT
      message as follows.

      ----- ./j2se/src/windows/native/sun/windows/awt_Component.cpp---
      ...
      MsgRouting AwtComponent::WmImeSetContext(BOOL fSet, LPARAM *lplParam)
      {
          // This message causes native status window shown even it is disabled. So don't
          // let DefWindowProc process this message if this IMC is disabled.
          HIMC hIMC = ImmGetContext();
          if (hIMC == NULL) {
              return mrConsume;
          }
      ...
      --------

      This program does not call DefWindowProc when it can not find out HIMC("if" statement is true).
      JDK should call either of ImmIsUIMessage() or DefWindowProc().

            naoto Naoto Sato
            tbaba Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: