*** empty log message ***
[m17n/m17n-lib.git] / src / input-gui.c
index 4f8520b..8ea078b 100644 (file)
@@ -158,10 +158,8 @@ win_filter (MInputContext *ic, MSymbol key, void *arg)
       || ! ic->active)
     return 0;
 
-  if (key == Mnil)
+  if (key == Mnil && arg)
     {
-      if (! arg)
-       return 0;
       key = minput_event_to_key (win_ic_info->frame, arg);
       if (key == Mnil)
        return 1;
@@ -312,7 +310,7 @@ win_callback (MInputContext *ic, MSymbol command)
       if (ic->im->language != Mnil)
        mtext_put_prop (ic->preedit, 0, mtext_nchars (ic->preedit), Mlanguage,
                        ic->im->language);
-      if (ic->candidate_list)
+      if (ic->candidate_list && ic->candidate_show)
        mtext_push_prop (ic->preedit, ic->candidate_from, ic->candidate_to,
                         Mface, mface_reverse_video);
       if (mtext_nchars (ic->produced) == 0)
@@ -548,7 +546,10 @@ minput__win_init ()
     plist = mplist_add (plist, Minput_toggle, (void *) win_callback);
     plist = mplist_add (plist, Minput_reset, (void *) win_callback);
   }
+#if 0
+  /* This will make the caller of minput_method_open() pazzled.  */
   minput_driver = &minput_gui_driver;
+#endif
 
   face_box_prop.width = 1;
   face_box_prop.color_top = face_box_prop.color_left
@@ -682,19 +683,19 @@ MSymbol Mxim;
     the byte is bitwise anded by 0x1F and the Control modifier is
     cleared.
 
-    If $EVENT still has Shift, Control, Meta, Alt, Super, and/or Hyper
-    modifiers, the name is preceded by "S-", "C-", "M-", "A-", "s-",
-    and/or "H-" respectively in this order.
+    If $EVENT still has modifiers, the name is preceded by "H-"
+    (Hyper), "s-" (Super), "A-" (Alt), "M-" (Meta), "C-" (Control),
+    and/or "S-" (Shift) in this order.
 
     For instance, if the keysym name is "a" and the event has Shift,
-    Meta, and Hyper modifiers, the resulting name is "H-M-A".
+    Meta, and Hyper modifiers, the resulting name is "M-H-A".
 
     At last, a symbol who has the name is returned.  */
 
 /***ja
     @brief ¥¤¥Ù¥ó¥È¤òÆþÎÏ¥­¡¼¤ËÊÑ´¹¤¹¤ë.
 
-    ´Ø¿ô minput_name_to_key () ¤Ï¡¢$FRAME ¤Î¥¤¥Ù¥ó¥È $EVENT 
+    ´Ø¿ô minput_event_to_key () ¤Ï¡¢$FRAME ¤Î¥¤¥Ù¥ó¥È $EVENT 
     ¤ËÂбþ¤¹¤ëÆþÎÏ¥­¡¼¤òÊÖ¤¹¡£¤³¤³¤Ç¤Î¡ÖÂбþ¡×¤Ï¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤Ë°Í¸¤¹¤ë¡£
 
     m17n-X ¥é¥¤¥Ö¥é¥ê¤Î¾ì¹ç¤Ë¤Ï¡¢$EVENT ¤Ï ¹½Â¤ÂΠ@c XKeyEvent 
@@ -708,14 +709,14 @@ MSymbol Mxim;
     ¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤Ï¼è¤ê½ü¤«¤ì¤ë¡£
 
     Ì¾Á°¤¬£±¥Ð¥¤¥ÈŤǠ$EVENT ¤Ë Control ¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤¬¤¢¤ì¤Ð¡¢Ì¾Á°¤È
-    0x1F ¤È¤ò¥Ó¥Ã¥Èñ°Ì and ±é»»¤¹¤ë¡£Control ¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤Ï¼è¤ê½ü¤«¤ì¤ë¡£
+    0x1F ¤È¤ò¥Ó¥Ã¥Èñ°Ì¤Ç and ±é»»¤·¡¢Control ¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤Ï¼è¤ê½ü¤«¤ì¤ë¡£
 
-    $EVENT ¤Ë¤Þ¤À Shift, Control, Meta, Alt, Super, Hyper 
-    ¤Ê¤É¤Î¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤¬¤¢¤ì¤Ð¡¢Ì¾Á°¤ÎÁ°¤Ë¤½¤ì¤¾¤ì"S-", "C-", "M-", "A-", "s-",
-    "H-" ¤¬ÉÕ¤¯¡£
+    ¤½¤ì¤Ç¤â $EVENT ¤Ë¤Þ¤À¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤¬¤¢¤ì¤Ð¡¢Ì¾Á°¤ÎÁ°¤Ë¤½¤ì¤¾¤ì
+    "H-" (Hyper), "s-" (Super), "A-" (Alt), "M-" (Meta), "C-"
+    (Control), "S-" (Shift) ¤¬¤³¤Î½çÈÖ¤ÇÉÕ¤¯¡£
     
     ¤¿¤È¤¨¤Ð¡¢keysym Ì¾¤¬ "a" ¤Ç¥¤¥Ù¥ó¥È¤¬ Shift, Meta, and Hyper 
-    ¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤ò»ý¤Æ¤Ð¡¢ÆÀ¤é¤ì¤ë̾Á°¤Ï "H-M-A" ¤Ç¤¢¤ë¡£
+    ¥â¥Ç¥£¥Õ¥¡¥¤¥¢¤ò»ý¤Æ¤Ð¡¢ÆÀ¤é¤ì¤ë̾Á°¤Ï "M-H-A" ¤Ç¤¢¤ë¡£
 
     ºÇ¸å¤Ë¤½¤Î̾Á°¤ò»ý¤Ä¥·¥ó¥Ü¥ë¤òÊÖ¤¹¡£*/