summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-10-19 09:58:58 +1000
committerChase Douglas <chase.douglas@ubuntu.com>2010-11-05 10:42:16 -0400
commit962e869bfccf8b48bb9f29032d050a6f5b3fef3c (patch)
treed5222d6a172944e8cb2e8fb7d702dbcf7c8dc9a8
parent4fc812e6238ec4d35922720352d92815d7bae195 (diff)
xfree86: convert xf86Post{Motion|Key|Button|Proximity}Event to masks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--hw/xfree86/common/xf86Xinput.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index cf54fd2f7..72c93223f 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -972,16 +972,17 @@ xf86PostMotionEvent(DeviceIntPtr device,
{
va_list var;
int i = 0;
- static int valuators[MAX_VALUATORS];
+ ValuatorMask mask;
XI_VERIFY_VALUATORS(num_valuators);
+ valuator_mask_zero(&mask);
va_start(var, num_valuators);
for (i = 0; i < num_valuators; i++)
- valuators[i] = va_arg(var, int);
+ valuator_mask_set(&mask, first_valuator + i, va_arg(var, int));
va_end(var);
- xf86PostMotionEventP(device, is_absolute, first_valuator, num_valuators, valuators);
+ xf86PostMotionEventM(device, is_absolute, &mask);
}
void
@@ -1060,18 +1061,17 @@ xf86PostProximityEvent(DeviceIntPtr device,
{
va_list var;
int i;
- int valuators[MAX_VALUATORS];
+ ValuatorMask mask;
XI_VERIFY_VALUATORS(num_valuators);
+ valuator_mask_zero(&mask);
va_start(var, num_valuators);
for (i = 0; i < num_valuators; i++)
- valuators[i] = va_arg(var, int);
+ valuator_mask_set(&mask, first_valuator + i, va_arg(var, int));
va_end(var);
- xf86PostProximityEventP(device, is_in, first_valuator, num_valuators,
- valuators);
-
+ xf86PostProximityEventM(device, is_in, &mask);
}
void
@@ -1113,19 +1113,19 @@ xf86PostButtonEvent(DeviceIntPtr device,
...)
{
va_list var;
- int valuators[MAX_VALUATORS];
+ ValuatorMask mask;
int i = 0;
XI_VERIFY_VALUATORS(num_valuators);
+ valuator_mask_zero(&mask);
+
va_start(var, num_valuators);
for (i = 0; i < num_valuators; i++)
- valuators[i] = va_arg(var, int);
+ valuator_mask_set(&mask, first_valuator + i, va_arg(var, int));
va_end(var);
- xf86PostButtonEventP(device, is_absolute, button, is_down, first_valuator,
- num_valuators, valuators);
-
+ xf86PostButtonEventM(device, is_absolute, button, is_down, &mask);
}
void
@@ -1192,18 +1192,18 @@ xf86PostKeyEvent(DeviceIntPtr device,
{
va_list var;
int i = 0;
- static int valuators[MAX_VALUATORS];
+ ValuatorMask mask;
XI_VERIFY_VALUATORS(num_valuators);
+ valuator_mask_zero(&mask);
+
va_start(var, num_valuators);
for (i = 0; i < num_valuators; i++)
- valuators[i] = va_arg(var, int);
+ valuator_mask_set(&mask, first_valuator + i, va_arg(var, int));
va_end(var);
- xf86PostKeyEventP(device, key_code, is_down, is_absolute, first_valuator,
- num_valuators, valuators);
-
+ xf86PostKeyEventM(device, key_code, is_down, is_absolute, &mask);
}
void