On Wednesday 11 December 2002 1:45 pm, Jean-Marc Lasgouttes wrote: > >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> JMarc, you mentioned that xforms' version of LyXLookupString > Angus> was broken on solaris. Can you supply me with more information? > > What I know is that the code in xforms is derived from what we have in > lyxlookup.C. One part is the one which calls XOpenIM/XCreateIC in > fl_initialize (flresource.c), and the other one is fl_XLookupString in > forms.c.
> There has to be a subtle differences in one of these areas. One > consequence is that compose key processing does not work on solaris. One glaring difference is this in LyXLookupString: if (xic) { #if 1 // somehow it is necessary to do the lookup. Why? (JMarc) XLookupString(&event->xkey, buffer_return, bytes_buffer, keysym_return, 0); if (lyxrc.override_x_deadkeys && ... result = XmbLookupString(...); } Did you ever get to the bottom of why you had to call XLookupString in order to call XmbLookupString successfully? Should xforms' call to XmbLookupString be "initialised" in this way also? > The cjk-lyx problem is different, since the patch normally modifies > lyxlookup.C to do different stuff (actually adds a LyXIM object), as > can be seen here > ftp://stone.phys.pusan.ac.kr/pub/CJK-LyX/CJK-LyX-1.2.1-patch > > However, with xforms 1.0, this is not possible anymore afaik. Ummmm. I still don't see why. xforms passes the raw XEvents to the workarea handler. These are then used by LyXLookupString, modified or not. It really shouldn't matter if xforms itself has tried to lookup the XEvent. KeySym keysym = 0; +#ifdef I18N + char s_r[256]; +#else char dummy[1]; +#endif XKeyEvent * xke = reinterpret_cast<XKeyEvent *>(ev); +#ifdef I18N + int num_bytes = LyXLookupString(ev, s_r, 256, &keysym); +#else LyXLookupString(ev, dummy, 1, &keysym); +#endif It just so happens that the call to LyXLookupString is wrapped up inside #if FL_VERSION < 1 && (FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)) But, that's our code, so we're free to change that. Angus