Changeset 4026

Show
Ignore:
Timestamp:
02/01/06 03:19:58 (3 years ago)
Author:
horiguti
Message:

* mw32ime.c (mw32-ime-input-method-function): Change the method
setting initial input into IME. Injecting key event instead of setting
composition string with WM_MULE_IMM_SET_COMPOSITION_STRING, which has
different behavior between MS-IME and ATOK.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r4025 r4026  
    2323        (fep-force-on): Ditto. 
    2424        (fep-force-off): Ditto. 
     25        (mw32-ime-input-method-function): Change the method setting 
     26        initial input into IME. Injecting key event instead of setting 
     27        composition string with WM_MULE_IMM_SET_COMPOSITION_STRING, which 
     28        has different behavior between MS-IME and ATOK. 
    2529 
    2630        * callproc.c (Vmw32_process_expects_pty): Renamed to 
  • trunk/src/mw32ime.c

    r4025 r4026  
    850850  ResetEvent (input_method_function_event); 
    851851 
     852  Ffep_force_on (Qnil); 
     853 
    852854  result = Qnil; 
    853855  redisplay_preserve_echo_area (30); 
     
    867869        } 
    868870    } 
    869   fflush (stdout); 
    870   if (STRINGP (str)) 
    871     { 
    872       str = ENCODE_SYSTEM (str); 
    873       SendMessage (hwnd, WM_MULE_IMM_SET_COMPOSITION_STRING, 
    874                    (WPARAM)(SDATA (str)), 0); 
    875     } 
    876   Ffep_force_on (Qnil); 
    877871 
    878872  mw32_set_ime_conv_window (hwnd, 
     
    880874                            XWINDOW (f->minibuffer_window): 
    881875                            XWINDOW (f->selected_window)); 
     876 
     877  /* Put the initnal string into IME via message. */ 
     878  if (STRINGP (str)) 
     879    { 
     880      char *p; 
     881      int ctrlstate; 
     882 
     883      /* Cancel control key if pressed */ 
     884      ctrlstate = GetKeyState (VK_CONTROL) & 0x80; 
     885      if (ctrlstate) 
     886        mw32_send_key_input (VK_CONTROL, 0, KEYEVENTF_KEYUP); 
     887 
     888      /* str assumed not to contain non-ascii characters. */ 
     889      for (p = SDATA (str) ; *p ; p++) 
     890        { 
     891          int c = toupper (*p); 
     892           
     893          mw32_send_key_input (c, 0, 0); 
     894          mw32_send_key_input (c, 0, KEYEVENTF_KEYUP); 
     895        } 
     896 
     897      /* Restore the state of control key */ 
     898      if (ctrlstate) 
     899        mw32_send_key_input (VK_CONTROL, 0, 0); 
     900    } 
    882901 
    883902  /* Rescue from dead block. This may not happen. */