[openi18n-im:01139] Re: Progress of hotkey implementation

Roger So <[email protected]>
Newsgroups gmane.comp.internationalization.input-methods
Message-ID <[email protected]>
Hideki Hiura wrote:
> Looked into the code more and recalled that this disabling was to incorporate
> the XResource based keybinding for XIM client.
> 
> The xiiimp.so handles TriggerNotify by itself so that the additional
> Triggerkeys defined via XResource also works as if yet another TriggerKey.

Right, and I can see that the corresponding code in htt_xbe is still there.

> But due to the Triggerkey to Hotkey transition, the 
> iiimcf_create_trigger_notify_event() and sending it via 
> iiimcf_forward_event() does not seem to work. (This is the real bug of
> not correctly mapping trigger_notify related event to hotkey_notify
> event in libiiimcf).

I guess the triggerkey functionality is not needed anymore?  It would 
somehow conflict with hotkeys anyway...

>>>>When I commented out the code in iiimcfFun.c, everything seems to work fine.
>>>
>>>Would you send us a patch(or commit it in)?

Oops, I thought I did...

>>I guess you've commented out the following code right?
>>
>>    st = iiimcf_attr_put_integer_value(attr,
>>                                       IIIMCF_ATTR_DISABLE_AUTOMATIC_TRIGGER_NO\TIFY,
>>                                       1);

Right, and also the following in IMForwardEvent():

	if (IsConversionMode(ic)) {
	    if (isConversionOffKey(im, ev)) {
                 IMTriggerNotify(ic, CONV_OFF);
                 SetConversionMode(ic, False);
                 return True;
             }
         } else {
             if (isConversionOnKey(im, ev)) {
                 SetConversionMode(ic, True);
                 if (IMTriggerNotify(ic, CONV_ON)) {
                     XIC_IIIMP(ic, switch_methods)->set_focus((XIC)ic);
                 }
                 return True;
             }
         }

> Because of this bug, commenting out this line would work.
> 
> If we do not need XResource based XIM only additional keybinding,
> the code around this functionality is not needed.
> 
> So at least until this bug is fixed one way or the other, commenting this
> line out is fine.

This time the diff is attached. :)

Roger
-- 
   Roger So                 Community Representative
   Sun Wah Linux Limited    Chinese Platform Developer
   Tel: +852 2250 0230      [email protected]
   Fax: +852 2259 9112      http://www.sw-linux.com/
iiimcfFuc.diff (text/plain, 885 B)
Index: iiimcfFun.c
===================================================================
--- iiimcfFun.c	(revision 2069)
+++ iiimcfFun.c	(working copy)
@@ -561,6 +561,7 @@
 	    kev.keycode, kev.keychar, kev.modifier);
 #endif
 
+#if 0
     if (IsConversionMode(ic)) {
 	if (isConversionOffKey(im, ev)) {
 	    IMTriggerNotify(ic, CONV_OFF);
@@ -576,6 +577,7 @@
 	    return True;
 	}
     }
+#endif
 
     st = iiimcf_create_keyevent(&kev, &event);
     if (st != IIIMF_STATUS_SUCCESS) return False;
@@ -748,10 +750,12 @@
     
     st = iiimcf_create_attr(&attr); 
     if (st != IIIMF_STATUS_SUCCESS) return st;
+#if 0
     st = iiimcf_attr_put_integer_value(attr,
 				       IIIMCF_ATTR_DISABLE_AUTOMATIC_TRIGGER_NOTIFY,
 				       1);
     if (st != IIIMF_STATUS_SUCCESS) goto exit;
+#endif
     lang = get_IM_language(im);
     if (lang) {
 	st = iiimcf_attr_put_ptr_value(attr,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.