Add xf86PostMotionEventP, takes a pointer instead of a variable number of
arguments. Bump input ABI to 1.1 since we export this.
This commit is contained in:
parent
a4f3473c88
commit
3f4295e643
|
@ -85,7 +85,7 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
|
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
|
||||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(2, 0)
|
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(2, 0)
|
||||||
#define ABI_XINPUT_VERSION SET_ABI_VERSION(1, 0)
|
#define ABI_XINPUT_VERSION SET_ABI_VERSION(1, 1)
|
||||||
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
|
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
|
||||||
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
|
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
|
||||||
|
|
||||||
|
|
|
@ -462,18 +462,8 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
va_list var;
|
va_list var;
|
||||||
int i = 0, nevents = 0;
|
int i = 0;
|
||||||
int dx, dy;
|
|
||||||
Bool drag = xf86SendDragEvents(device);
|
|
||||||
int *valuators = NULL;
|
int *valuators = NULL;
|
||||||
int flags = 0;
|
|
||||||
xEvent *xE = NULL;
|
|
||||||
int index;
|
|
||||||
|
|
||||||
if (is_absolute)
|
|
||||||
flags = POINTER_ABSOLUTE;
|
|
||||||
else
|
|
||||||
flags = POINTER_RELATIVE | POINTER_ACCELERATE;
|
|
||||||
|
|
||||||
valuators = xcalloc(sizeof(int), num_valuators);
|
valuators = xcalloc(sizeof(int), num_valuators);
|
||||||
|
|
||||||
|
@ -482,6 +472,29 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
||||||
valuators[i] = va_arg(var, int);
|
valuators[i] = va_arg(var, int);
|
||||||
va_end(var);
|
va_end(var);
|
||||||
|
|
||||||
|
xf86PostMotionEventP(device, is_absolute, first_valuator, num_valuators, valuators);
|
||||||
|
xfree(valuators);
|
||||||
|
}
|
||||||
|
|
||||||
|
_X_EXPORT void
|
||||||
|
xf86PostMotionEventP(DeviceIntPtr device,
|
||||||
|
int is_absolute,
|
||||||
|
int first_valuator,
|
||||||
|
int num_valuators,
|
||||||
|
int *valuators)
|
||||||
|
{
|
||||||
|
int i = 0, nevents = 0;
|
||||||
|
int dx, dy;
|
||||||
|
Bool drag = xf86SendDragEvents(device);
|
||||||
|
xEvent *xE = NULL;
|
||||||
|
int index;
|
||||||
|
int flags = 0;
|
||||||
|
|
||||||
|
if (is_absolute)
|
||||||
|
flags = POINTER_ABSOLUTE;
|
||||||
|
else
|
||||||
|
flags = POINTER_RELATIVE | POINTER_ACCELERATE;
|
||||||
|
|
||||||
#if XFreeXDGA
|
#if XFreeXDGA
|
||||||
if (first_valuator == 0 && num_valuators >= 2) {
|
if (first_valuator == 0 && num_valuators >= 2) {
|
||||||
if (miPointerGetScreen(inputInfo.pointer)) {
|
if (miPointerGetScreen(inputInfo.pointer)) {
|
||||||
|
@ -495,7 +508,7 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
||||||
dy = valuators[1];
|
dy = valuators[1];
|
||||||
}
|
}
|
||||||
if (DGAStealMotionEvent(index, dx, dy))
|
if (DGAStealMotionEvent(index, dx, dy))
|
||||||
goto out;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -517,9 +530,6 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
||||||
mieqEnqueue(device, xf86Events + i);
|
mieqEnqueue(device, xf86Events + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
xfree(valuators);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
|
|
|
@ -163,6 +163,8 @@ extern InputInfoPtr xf86InputDevs;
|
||||||
void InitExtInput(void);
|
void InitExtInput(void);
|
||||||
void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
|
void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
|
||||||
int first_valuator, int num_valuators, ...);
|
int first_valuator, int num_valuators, ...);
|
||||||
|
void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute,
|
||||||
|
int first_valuator, int num_valuators, int *valuators);
|
||||||
void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
|
void xf86PostProximityEvent(DeviceIntPtr device, int is_in,
|
||||||
int first_valuator, int num_valuators, ...);
|
int first_valuator, int num_valuators, ...);
|
||||||
void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
|
void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user