Angus Leeming wrote: > [EMAIL PROTECTED] wrote: >> Not yet! In fact, as I dig into the problem further, I get more confused >> and discouraged. > > Whoa! Perhaps that's because we're trying to be greedy and get everything > working at the same time. > > Let's see if we can get a simple xforms dialog working first and then see > if we can merge this into LyX. Try and use the attached, simple xforms > code for your testing together with the attached patch to xforms' input.c > > Of course, I don't know what I'm doing when it comes to the nitty gritty > of creating an input context, but can't you create and then destroy a new > one each time you toggle the input method? That's what my patch to input.c > does. (Well, it doesn't destroy it, but that should be straightforward.) > > Sure, it may be a relatively expensive way of doing things, but so what? > Especially for now. > > The code compiles and DOES NOT CRASH when I use it, so that's a start. I > assume that you'll have to move the code in lyxim into the xforms library > to actually proceed from here (input CJK) but that was the point of the > excercise wasn't it?
I forgot to point out that if you incorporate your new code into turn_on_local_input, rather than my cut-and-paste job of your original modification of fl_resource.c, then you'll be able to set the IC just where you want it. I couldn't do this because I didn't know what to put in char * DUMMY_FONT_NAME; Presumably you'll need an XDeleteIC in turn_off_local_input? Regards, Angus To go in the if (fl_context->xim) { ... } block of turn_on_local_input. XFontSet fontset = XCreateFontSet(fl_display, DUMMY_FONT_NAME, &missing_list,&missing_count, &def_string); XPoint location; - location.x = 0; - location.y = 0; + location.x = ob->x; + location.y = ob->y; XVaNestedList preedit_list; XVaNestedList status_list; preedit_list = XVaCreateNestedList( 0, XNSpotLocation, &location, XNFontSet, fontset, NULL); status_list = XVaCreateNestedList( 0, XNFontSet, fontset, NULL); fl_context->xic = XCreateIC(fl_context->xim, XNInputStyle, style, XNPreeditAttributes, preedit_list,