From 8532cc5654feb5cdb38ab8bd46b65d4e3864f769 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 19 Oct 2006 13:36:33 +0200 Subject: [PATCH] winex11.drv: Hack to work around an Xlib bug when XInitThreads is used. --- dlls/winex11.drv/x11drv_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index ea50cfb5171..068db14b712 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -514,7 +514,14 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) if (use_xkb) { use_xkb = XkbUseExtension( data->display, NULL, NULL ); - if (use_xkb) XkbSetDetectableAutoRepeat( data->display, True, NULL ); + if (use_xkb) + { + /* Hack: dummy call to XkbKeysymToModifiers to force initialisation of Xkb internals */ + /* This works around an Xlib bug where it tries to get the display lock */ + /* twice during XFilterEvents if Xkb hasn't been initialised yet. */ + XkbKeysymToModifiers( data->display, 'A' ); + XkbSetDetectableAutoRepeat( data->display, True, NULL ); + } } #endif