xserver: Branch 'input-hotplug'
Zephaniah E. Hull
warp at kemper.freedesktop.org
Wed Oct 18 12:32:45 EEST 2006
hw/xfree86/common/xf86Xinput.c | 8 +++++++-
hw/xfree86/common/xf86Xinput.h | 8 ++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
New commits:
diff-tree 1b1698af41b9038d9f9dbf521737d0baab5a2237 (from 6dd4fc4652f942724039dc2317c560ea7276ab59)
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date: Wed Oct 18 04:57:22 2006 -0400
Pass SetDeviceValuators down to the driver.
NOTE: This changes the LocalDeviceRec struct, which breaks input drivers.
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 6927720..411dedd 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -501,7 +501,13 @@ int
SetDeviceValuators (ClientPtr client, DeviceIntPtr dev, int *valuators,
int first_valuator, int num_valuators)
{
- return BadMatch;
+ LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
+
+ if (local->set_device_valuators)
+ return (*local->set_device_valuators)(local, valuators, first_valuator,
+ num_valuators);
+
+ return BadMatch;
}
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 444b2d4..73dcdb7 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -113,7 +113,7 @@ typedef struct _LocalDeviceRec {
struct _LocalDeviceRec *next;
char * name;
int flags;
-
+
Bool (*device_control)(DeviceIntPtr device, int what);
void (*read_input)(struct _LocalDeviceRec *local);
int (*control_proc)(struct _LocalDeviceRec *local,
@@ -128,7 +128,11 @@ typedef struct _LocalDeviceRec {
Bool (*reverse_conversion_proc)(
struct _LocalDeviceRec *local,
int x, int y, int *valuators);
-
+ int (*set_device_valuators)
+ (struct _LocalDeviceRec *local,
+ int *valuators, int first_valuator,
+ int num_valuators);
+
int fd;
Atom atom;
DeviceIntPtr dev;
More information about the xorg-commit
mailing list