winex11.drv: Prevent XCreateIC from returning NULL when input style isn't "root". (try 3)

Muneyuki Noguchi at
Mon Oct 13 02:50:01 CDT 2008

In the current implementation of Wine, XCreateIC() in
X11DRV_CreateIC() returns NULL with SCIM-Anthy when input style is set
to "over the spot" even in CJK environment because a font set isn't
given to XCreateIC(). So Wine users can't turn on the input method in
this settings. This patch allocates one font set per input context
(XIC) and gives it to XCreateIC(). With this patch, XCreateFontSet()
is called in X11DRV_CreateIC(), where XCreateIC() is called, and
XFreeFontSet() is called in destroy_whole_window(), where XDestroyIC()
is called:

XCreateIC - XDestroyIC
XCreateFontSet - XFreeFontSet

Before Wine 0.9.40, a font set was given to XCreateIC() but was
removed by Nigel Liang's patch[1] to fix bug 5309 (he overlooked the
regression).[2] But in this patch, "fixed" is given to the second
argument of XCreateFontSet() instead of "*", and X11DRV_CreateIC() in
Wine 1.1.6 is called less frequently than that in Wine 0.9.40. I think
this patch won't introduce performance issues.

You can reproduce the regression by setting locale ($LANG) to one of
CJK, adding the following two lines to ~/.wine/user.reg:

[Software\\Wine\\X11 Driver]

and running a text editor.

2.  (Wine performance lost
on some CJK environment)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winex11.drv-Prevent-XCreateIC-from-returning-NULL-w.patch
Type: text/x-patch
Size: 3608 bytes
Desc: not available
Url : 

More information about the wine-patches mailing list