[EMAIL PROTECTED] wrote: >> XIC is designed to be created for each GC (graphic >> context). Especially, each window (widget) must >> have its own input context if it expects user input. >> The current design of xforms is flawed that it >> creates only process global XIC and tries to use it >> for all widgets.
Perhaps this is the root of your problems, Mr Han? The GC is created in fl_create_gc and called by fl_create_window from fl_prepare_form_window, to be found in forms.c. Thus, you should move the XCreateIC call from fl_initialize to a point in fl_prepare_form_window after the GC has been created. Moreover, you should store the generated xic in struct FL_FORM if it is a per-window variable, rather than in FL_CONTEXT. Ditto, close_form_win calls XDestroyWindow. Presumably you should therefore call XDestroyIC in this routine. At least when you've done that you can be sure that you are 'doing the right thing' ;-) Note that 'xic' is referenced only a couple of times in the xforms code, in: * fl_default_xswa (sets the default window attributes) --- is this necessary? If so, you should just pass an extra var to the routine telling it to do this. * fl_winsize (open window with a spcific size) --- but it has been commented out. * finally, in do_interaction_step, case FocusIn. Again, is this necessary if the xic is created for each window? Presumably, this code can be moved to the place where you XCreateIC. See if you can get things to the current (partially working) state. At least now you should be able to specify a non-zero position for the location.x,y when you XCreateIC because the form (Window) now exists. Thereafter, can you modify these vales with XSetICValues? Incidentally, how would you prefer I call you in these letters? CGHan, CG, Mr Han, ChangGil ??? Regards, -- Angus