winex11: The XIM callback is called with the X11 lock held.

This commit is contained in:
Alexandre Julliard 2008-05-05 15:08:33 +02:00
parent 22328d0ce5
commit dffab36e8b
1 changed files with 6 additions and 6 deletions

View File

@ -375,6 +375,8 @@ static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data)
/***********************************************************************
* X11DRV Ime creation
*
* Should always be called with the x11 lock held
*/
static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
{
@ -385,13 +387,10 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
XIM xim;
XIMCallback destroy;
wine_tsx11_lock();
xim = XOpenIM(display, NULL, NULL, NULL);
if (xim == NULL)
{
WARN("Could not open input method.\n");
wine_tsx11_unlock();
return;
}
@ -411,7 +410,6 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data)
{
WARN("Could not find supported input style.\n");
XCloseIM(xim);
wine_tsx11_unlock();
return;
}
else
@ -474,8 +472,10 @@ 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();
}