Merge branch 'dtrace-input-abi' into for-keith

This commit is contained in:
Peter Hutterer
2012-03-22 11:34:43 +10:00
4 changed files with 201 additions and 3 deletions

View File

@@ -68,6 +68,12 @@
#include "extnsionst.h"
#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */
#if XSERVER_DTRACE
#include <sys/types.h>
typedef const char *string;
#include <Xserver-dtrace.h>
#endif
/* Number of motion history events to store. */
#define MOTION_HISTORY_SIZE 256
@@ -1026,6 +1032,15 @@ GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
RawDeviceEvent *raw;
ValuatorMask mask;
#if XSERVER_DTRACE
if (XSERVER_INPUT_EVENT_ENABLED()) {
XSERVER_INPUT_EVENT(pDev->id, type, key_code, 0,
mask_in ? mask_in->last_bit + 1 : 0,
mask_in ? mask_in->mask : NULL,
mask_in ? mask_in->valuators : NULL);
}
#endif
/* refuse events from disabled devices */
if (!pDev->enabled)
return 0;
@@ -1503,6 +1518,15 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
int i;
int realtype = type;
#if XSERVER_DTRACE
if (XSERVER_INPUT_EVENT_ENABLED()) {
XSERVER_INPUT_EVENT(pDev->id, type, buttons, flags,
mask_in ? mask_in->last_bit + 1 : 0,
mask_in ? mask_in->mask : NULL,
mask_in ? mask_in->valuators : NULL);
}
#endif
/* refuse events from disabled devices */
if (!pDev->enabled)
return 0;
@@ -1628,6 +1652,15 @@ GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
DeviceEvent *event;
ValuatorMask mask;
#if XSERVER_DTRACE
if (XSERVER_INPUT_EVENT_ENABLED()) {
XSERVER_INPUT_EVENT(pDev->id, type, 0, 0,
mask_in ? mask_in->last_bit + 1 : 0,
mask_in ? mask_in->mask : NULL,
mask_in ? mask_in->valuators : NULL);
}
#endif
/* refuse events from disabled devices */
if (!pDev->enabled)
return 0;
@@ -1752,6 +1785,15 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
Bool emulate_pointer = FALSE;
int client_id = 0;
#if XSERVER_DTRACE
if (XSERVER_INPUT_EVENT_ENABLED()) {
XSERVER_INPUT_EVENT(dev->id, type, ddx_touchid, flags,
mask_in ? mask_in->last_bit + 1 : 0,
mask_in ? mask_in->mask : NULL,
mask_in ? mask_in->valuators : NULL);
}
#endif
if (!dev->enabled || !t || !v)
return 0;