On Mon, 31 May 2010 19:47:41 -0400
Slava Pestov <sl...@factorcode.org> wrote:
> Hi Philipp,
> 
> At some point our XIM backend used the Xutf8* functions but then I
> switched to Xwc, I think because the utf8 version was buggy on some
> *nix or another. Now you're changing it back. What's the rationale
> behind this change?
> 
> Also you use with-out-parameters for an int and XAtom, but malloc an
> out parameter buffer. You can do this though,
> 
> { { char buf-size } KeySym int } [
>     :> ( buf keysym status )
>     ...
> ] with-out-parameters
> 
> as long as buf-size is a constant, you can have a stack-allocated
> array of that size.
> 
> I think the plan is to replace the X11 backend with Anton's Gtk
> backend in the near future. So there's nothing to gain from doing any
> additional engineering work on the X11 backend.
> 
> As for the PNG fix, I understand that there is a bug, but the fix
> seems a bit overdesigned and also tacked on. Is it really necessary to
> save and restore the pack alignment when creating every texture? Why
> not set it once for the entire Factor UI in the init-gl word of the
> ui.render vocabulary?
> 
> Slava

Hi Slava

For the PNG fix, I pushed a new version with the changes you suggested:

http://github.com/Blei/factor

Bootstrap works, png loading works.

> At some point our XIM backend used the Xutf8* functions but then I
> switched to Xwc, I think because the utf8 version was buggy on some
> *nix or another. Now you're changing it back. What's the rationale
> behind this change?

The man-page for XwcLookupString says: "Both XmbLookupString and
XwcLookup‐ String return text in the encoding of the locale bound to
the input method of the specified input context, and Xutf8LookupString
returns text in UTF-8 encoding." The current code instead
unconditionally decodes the returned string as utf16n, which presumably
makes it fail the 'valid-input?' test and breaks input methods (or at
least my input method). So I thought nice fix would be to use Xutf8..
instead. If this function is broken then the proper fix would be to
find the encoding the input method is bound to. A quick test using
XmbLookupString and utf8 (my local encoding) works. But if you don't
want to sink time into x11, then i'll just use this fix locally.

Thanks for your time!

------------------------------------------------------------------------------

_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to