Hi,

This patch removes a call to XCreateFontSet which was causing wine to
be very slow in some Chinese locale settings. The server side font
calls are supposed to be deprecated anyway as Dan pointed out in his
comment here: http://bugs.winehq.org/show_bug.cgi?id=5309

According to the Xlib programming manual, if a font set is not
specified when calling XCreateIC, the default is determined by the
input method. But it seems that this used to be a required field, so I
am not sure if this will break any old input methods out there. Any
ideas on how I could better test this before submitting?

Thanks!
-Nigel
diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c
index 2be9dd2..8f7d35a 100644
--- a/dlls/winex11.drv/xim.c
+++ b/dlls/winex11.drv/xim.c
@@ -456,7 +456,6 @@ err:
 
 XIC X11DRV_CreateIC(XIM xim, Display *display, Window win)
 {
-    XFontSet fontSet = NULL;
     char **list;
     int count;
     XPoint spot = {0};
@@ -485,29 +484,6 @@ XIC X11DRV_CreateIC(XIM xim, Display *di
         return xic;
     }
 
-
-    if (((ximStyle & (XIMPreeditNothing | XIMPreeditNone)) == 0) ||
-        ((ximStyle & (XIMStatusNothing | XIMStatusNone)) == 0))
-    {
-        fontSet = XCreateFontSet(display,
-                          "*", /*FIXME*/
-                          &list, &count, NULL);
-
-        TRACE("ximFontSet = %p\n", fontSet);
-        TRACE("list = %p, count = %d\n", list, count);
-
-        if (list != NULL)
-        {
-            int i;
-
-            for (i = 0; i < count; ++i)
-            {
-                TRACE("list[%d] = %s\n", i, list[i]);
-            }
-            XFreeStringList(list);
-        }
-    }
-
     /* create callbacks */
     P_StartCB.client_data = NULL;
     P_StartCB.callback = (XIMProc)XIMPreEditStartCallback;
@@ -521,7 +497,6 @@ XIC X11DRV_CreateIC(XIM xim, Display *di
     if ((ximStyle & (XIMPreeditNothing | XIMPreeditNone)) == 0)
     {
         preedit = XVaCreateNestedList(0,
-                        XNFontSet, fontSet,
                         XNSpotLocation, &spot,
                         XNPreeditStartCallback, &P_StartCB,
                         XNPreeditDoneCallback, &P_DoneCB,
@@ -545,7 +520,6 @@ XIC X11DRV_CreateIC(XIM xim, Display *di
     if ((ximStyle & (XIMStatusNothing | XIMStatusNone)) == 0)
     {
         status = XVaCreateNestedList(0,
-            XNFontSet, fontSet,
             NULL);
         TRACE("status = %p\n", status);
      }


Reply via email to