diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-03-22 11:34:43 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-03-22 11:34:43 +1000 |
commit | bf876c87a9099fdfa63ed599f8ed9a954dd023d9 (patch) | |
tree | 7747337be6b6a72cdfb37db409e239e250a272bc /dix/getevents.c | |
parent | 908ab3d580188533168c8cdfd2cab9dc689b4218 (diff) | |
parent | c0b0a9bce9237b0abe150c1a7b54939affecc751 (diff) |
Merge branch 'dtrace-input-abi' into for-keith
Diffstat (limited to 'dix/getevents.c')
-rw-r--r-- | dix/getevents.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index fa85fe7cf..3093786c3 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -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; |