Module: wine Branch: master Commit: 8532cc5654feb5cdb38ab8bd46b65d4e3864f769 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8532cc5654feb5cdb38ab8bd46...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Oct 19 13:36:33 2006 +0200
winex11.drv: Hack to work around an Xlib bug when XInitThreads is used.
---
dlls/winex11.drv/x11drv_main.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index ea50cfb..068db14 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -514,7 +514,14 @@ #ifdef HAVE_XKB 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