[PATCH] dix: Export more input related functions from Xorg

Peter Hutterer peter.hutterer at who-t.net
Sun Apr 11 21:59:10 PDT 2010


On Mon, Mar 22, 2010 at 02:52:29PM +0100, Adam Tkac wrote:
> Hello all,
> 
> I would like to ask you to apply attached patch to both master and
> server-1.7-branches.
> 
> The patch exports four functions, AllocDevicePair, GetPointerEvents,
> GetKeyboardEvents and generate_modkeymap, from Xorg. Those functions
> are currently used by TigerVNC libvnc.so module which doesn't use
> standard XInput infrastructure but uses same approach like XTest
> input devices.
> 
> Main reason why libvnc.so doesn't use standard XInput functions, like
> other input drivers, is that libvnc.so file contains two modules, VNC
> extension and VNC input driver. Current Xorg loader is not able to
> load two modules from one file.
> 
> Another reason is that we (TigerVNC project) would like to share input
> related code between libvnc.so module and Xvnc, standalone X server.
> Standalone X server (similar to Xnest, Xvfb) can't use xf86* input
> driver infrastructure because it is only part of Xorg.
> 
> Regards, Adam
> 
> -- 
> Adam Tkac, Red Hat, Inc.

> From 53c0a61c7047d1c3bb27715b6e2e374a9e3fc221 Mon Sep 17 00:00:00 2001
> From: Adam Tkac <atkac at redhat.com>
> Date: Mon, 22 Mar 2010 13:59:17 +0100
> Subject: [PATCH] dix: Export AllocDevicePair GetPointerEvents, GetKeyboardEvents and
>  generate_modkeymap functions from Xorg.
> 
> Those functions are used by TigerVNC libvnc.so module which doesn't
> use standard XInput infrastructure but uses same functions like,
> for example, XTest devices.
> 
> Signed-off-by: Adam Tkac <atkac at redhat.com>
> ---
>  include/input.h |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/input.h b/include/input.h
> index 8561308..63f981e 100644
> --- a/include/input.h
> +++ b/include/input.h
> @@ -432,7 +432,7 @@ extern void CreateClassesChangedEvent(EventListPtr event,
>                                        DeviceIntPtr master,
>                                        DeviceIntPtr slave,
>                                        int type);
> -extern int GetPointerEvents(
> +extern _X_EXPORT int GetPointerEvents(
>      EventListPtr events,
>      DeviceIntPtr pDev,
>      int type,
> @@ -442,7 +442,7 @@ extern int GetPointerEvents(
>      int num_valuators,
>      int *valuators);
>  
> -extern int GetKeyboardEvents(
> +extern _X_EXPORT int GetKeyboardEvents(
>      EventListPtr events,
>      DeviceIntPtr pDev,
>      int type,
> @@ -493,7 +493,7 @@ extern int AttachDevice(ClientPtr client,
>  extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
>  extern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
>  
> -extern int AllocDevicePair(ClientPtr client,
> +extern _X_EXPORT int AllocDevicePair(ClientPtr client,
>                               char* name,
>                               DeviceIntPtr* ptr,
>                               DeviceIntPtr* keybd,
> @@ -505,7 +505,7 @@ extern void DeepCopyDeviceClasses(DeviceIntPtr from,
>                                    DeviceChangedEvent *dce);
>  
>  /* Helper functions. */
> -extern int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
> +extern _X_EXPORT int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
>                                KeyCode **modkeymap, int *max_keys_per_mod);
>  extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map,
>                           int max_keys_per_mod);
> -- 
> 1.7.0.1
> 

whoah, that one nearly got lost. sorry about that.
I had a look at the TigerVNC code and the use of GPE and friends certainly
makes sense. I've merged this patch into my tree.

Cheers,
  Peter


More information about the xorg-devel mailing list