[PATCH 2/2] AllocDevicePair: Ensure XKB privates are initialised

Peter Hutterer peter.hutterer at who-t.net
Tue Jul 10 21:18:46 PDT 2012


On Tue, Jul 10, 2012 at 09:10:22AM +0100, Daniel Stone wrote:
> 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 at fooishbar.org>
> ---

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
  Peter

>  dix/devices.c |    2 ++
>  test/xtest.c  |    2 --
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/dix/devices.c b/dix/devices.c
> index 839de35..6a51d45 100644
> --- a/dix/devices.c
> +++ b/dix/devices.c
> @@ -2672,6 +2672,8 @@ AllocDevicePair(ClientPtr client, const char *name,
>  
>      *ptr = *keybd = NULL;
>  
> +    XkbInitPrivates();
> +
>      pointer = AddInputDevice(client, ptr_proc, TRUE);
>  
>      if (!pointer)
> diff --git a/test/xtest.c b/test/xtest.c
> index 99e2185..402d9ce 100644
> --- a/test/xtest.c
> +++ b/test/xtest.c
> @@ -76,8 +76,6 @@ xtest_init_devices(void)
>      InitAtoms();
>      SyncExtensionInit();
>  
> -    XkbInitPrivates();
> -
>      /* this also inits the xtest devices */
>      InitCoreDevices();
>  
> -- 
> 1.7.10.4



More information about the xorg-devel mailing list