[pkg-wine-party] [SCM] Debian Wine packaging branch, lenny, updated. wine-1.0.0-1-126-gccc5cbd

Alexandre Julliard julliard at winehq.org
Thu Oct 30 14:43:43 UTC 2008


The following commit has been merged in the lenny branch:
commit d1dd56ffa2d0b4f70c8982f7bd39b0260ddd1477
Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sat Jun 21 11:18:07 2008 +0200

    winex11: Only register an XIM callback if we can't open the XIM right away.
    (cherry picked from commit 5b7bec34c1b550e26744fe632a55e196a751eab4)

diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c
index 8512583..252dacd 100644
--- a/dlls/winex11.drv/xim.c
+++ b/dlls/winex11.drv/xim.c
@@ -359,7 +359,7 @@ BOOL X11DRV_InitXIM( const char *input_style )
 }
 
 
-static void X11DRV_OpenIM(Display *display, XPointer p, XPointer data);
+static void open_xim_callback( Display *display, XPointer ptr, XPointer data );
 
 static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data)
 {
@@ -369,7 +369,7 @@ static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data)
     thread_data->xim = NULL;
     ximStyle = 0;
     wine_tsx11_lock();
-    XRegisterIMInstantiateCallback( thread_data->display, NULL, NULL, NULL, X11DRV_OpenIM, NULL );
+    XRegisterIMInstantiateCallback( thread_data->display, NULL, NULL, NULL, open_xim_callback, NULL );
     wine_tsx11_unlock();
 }
 
@@ -378,7 +378,7 @@ static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data)
  *
  * Should always be called with the x11 lock held
  */
-static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
+static BOOL open_xim( Display *display )
 {
     struct x11drv_thread_data *thread_data = x11drv_thread_data();
     XIMStyle ximStyleCallback, ximStyleNone;
@@ -391,7 +391,7 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
     if (xim == NULL)
     {
         WARN("Could not open input method.\n");
-        return;
+        return FALSE;
     }
 
     destroy.client_data = NULL;
@@ -410,7 +410,7 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
     {
         WARN("Could not find supported input style.\n");
         XCloseIM(xim);
-        return;
+        return FALSE;
     }
     else
     {
@@ -471,18 +471,26 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
     }
 
     thread_data->xim = xim;
-    XUnregisterIMInstantiateCallback(display, NULL, NULL, NULL, X11DRV_OpenIM, NULL);
 
     wine_tsx11_unlock();
     IME_UpdateAssociation(NULL);
     wine_tsx11_lock();
+    return TRUE;
 }
 
+static void open_xim_callback( Display *display, XPointer ptr, XPointer data )
+{
+    if (open_xim( display ))
+        XUnregisterIMInstantiateCallback( display, NULL, NULL, NULL, open_xim_callback, NULL);
+}
 
 void X11DRV_SetupXIM(void)
 {
+    Display *display = thread_display();
+
     wine_tsx11_lock();
-    XRegisterIMInstantiateCallback(thread_display(), NULL, NULL, NULL, X11DRV_OpenIM, NULL);
+    if (!open_xim( display ))
+        XRegisterIMInstantiateCallback( display, NULL, NULL, NULL, open_xim_callback, NULL );
     wine_tsx11_unlock();
 }
 

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list