AllocDevicePair: Ensure XKB privates are initialised

Since we call directly into XKB and may be doing so before the extension
has been initialised, make sure its privates are set up first.  XTest
had a hack to do this itself, but seems cleaner to just make sure we do
it in AllocDevicePair.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Daniel Stone 2012-07-10 09:10:22 +01:00 committed by Keith Packard
parent f937c3d501
commit 59c2c4f645
2 changed files with 2 additions and 2 deletions

View File

@ -2674,6 +2674,8 @@ AllocDevicePair(ClientPtr client, const char *name,
*ptr = *keybd = NULL;
XkbInitPrivates();
pointer = AddInputDevice(client, ptr_proc, TRUE);
if (!pointer)

View File

@ -76,8 +76,6 @@ xtest_init_devices(void)
InitAtoms();
SyncExtensionInit();
XkbInitPrivates();
/* this also inits the xtest devices */
InitCoreDevices();