From b539a571e32c96439db4739014a69e69be2f6d1f Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 20 Nov 2003 23:46:24 +0000 Subject: [PATCH] There's no need to initialize XKB on the GDI display, this saves a couple of server round trips. --- dlls/x11drv/x11drv_main.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c index c7898518676..03e610a9add 100644 --- a/dlls/x11drv/x11drv_main.c +++ b/dlls/x11drv/x11drv_main.c @@ -337,20 +337,6 @@ static void process_attach(void) } else screen_depth = DefaultDepthOfScreen( screen ); - /* check for Xkb extension */ -#ifdef HAVE_XKB - if (use_xkb) - { - int xkb_opcode, xkb_event, xkb_error; - int xkb_major = XkbMajorVersion, xkb_minor = XkbMinorVersion; - - use_xkb = XkbQueryExtension(display, &xkb_opcode, &xkb_event, &xkb_error, - &xkb_major, &xkb_minor); - if (use_xkb) /* we have XKB, approximate Windows behaviour */ - XkbSetDetectableAutoRepeat(display, True, NULL); - } -#endif - /* Initialize OpenGL */ X11DRV_OpenGL_Init(display); @@ -469,7 +455,11 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) WARN("Can't open input method\n"); #ifdef HAVE_XKB - if (use_xkb) XkbSetDetectableAutoRepeat( data->display, True, NULL ); + if (use_xkb) + { + use_xkb = XkbUseExtension( data->display, NULL, NULL ); + if (use_xkb) XkbSetDetectableAutoRepeat( data->display, True, NULL ); + } #endif if (synchronous) XSynchronize( data->display, True ); -- 2.11.4.GIT