On Sunday 02 February 2003 2:12 pm, [EMAIL PROTECTED] wrote: > On Sun, 2 Feb 2003, Angus Leeming wrote: > > Oh, well done ChangGil! A Happy start to the Old New Year! > > So far so good. Happy about that! > > > Looking at the code in input.c, I see code in handle_key: > > > > SPEC *sp = ob->spec; > > ... > > /* merge the new character */ > > for (i = slen + 1; i > sp->position; i--) > > sp->str[i] = sp->str[i - 1]; > > sp->str[sp->position] = key; > > sp->position++; > > > > Does this provide you with the info you need? > > Yes, but how can I use this in forms.c?
Oh, I see. You can't. But you shouldn't be either. I thought that you were going to create the IC in forms.c and then MODIFY it in input.c when the user pressed 'Shift Space'. That way, your precomposition area will: 1. move along the input widget as you insert more and more chars. 2. if you have two input widgets in one dialog, then the user will be able to do his precomposition in which ever widget he is currently inserting text. Isn't this what you really want to do? > > It's hard to debug when I'm not sure exactly which of my patches > > "xforms.diff" you are talking about. > Sorry I was not clear. Yes, the big xforms.diff. > >Do you not need to modify it to: > > if (keysym == NoSymbol && kbuflen == 0) > > return; > > Yes, with that modification I can input Korean characters on the > XWorkArea. Excellent! > My debug says that during the composition, keysym ==0 but 'fully composed' > Korean character has non-zero keysym. That is, after "shift-space" keysym > with each keyboard input is zero, but hitting "space-bar" gives non-zero > keysym. Ok, then your Korean composition and my Western composition are functionally identical. The difference is that Multi_key composition is build-into the X11 server so I can ignore kbuflen, keybuf. You, however, cannot. Presumably, therefore, you should turn off the precomposition stuff in input.c with something like: if (sp->CJK_composition_on && keysym) Turn_off_composition_Insert_composed_char_and Increment_position_by_one(); (Sorry, I forgot what names I gave this variable/function before ;-) The fact that you use the space-bar to finish composition is irrelevant to the widget because ity doesn't see XK_space. Instead, it sees the keysym of your composed char. > > Is this event passed through to fl_handle_form from do_keyboard > The events pass through to "fl_handle_form" with non-zero keysym in > do_keyboard. > > If the event is passed through to handle_key in input.c, then how do you > > handle it? > I don't know. Why do you consider that? What I'm trying to say is "how do you tell the input widget that it is no longer dealing with precomposition but has received a fully composed char?" But, you've answered that above. > Attached is my trial patch againt the clean xforms-1.0-release.tgz. Ummm. No it isn't. Do you need to send it to me just yet or does the above advice enable you to progress a little further? Angus