diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-01-10 14:53:44 +1030 |
---|---|---|
committer | Peter Hutterer <whot@hyena.localdomain> | 2007-01-10 14:53:44 +1030 |
commit | bfd533c3a7e854d893a06e6a7fe2b3f079508a4d (patch) | |
tree | 5e1ffafb263353db2eebbf2b74ad1a03f6627626 /src/XExtToWire.c | |
parent | ebc24f1fad85281a1e9e795ec261eea111f40304 (diff) |
Adding DeviceEnterNotify and DeviceLeaveNotify calls
New XI version using Add_MPX_Major/Minor
Diffstat (limited to 'src/XExtToWire.c')
-rw-r--r-- | src/XExtToWire.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/XExtToWire.c b/src/XExtToWire.c index 213da32..a93a811 100644 --- a/src/XExtToWire.c +++ b/src/XExtToWire.c @@ -454,6 +454,32 @@ _XiEventToWire(dpy, re, event, count) cev->deviceid = ev->deviceid; break; } + case XI_DeviceEnterNotify: + case XI_DeviceLeaveNotify: + { + register XDeviceCrossingEvent *ev = (XDeviceCrossingEvent*)re; + register deviceEnterNotify *elev; + + *count =1; + elev = (deviceEnterNotify *) Xmalloc(*count * sizeof(xEvent)); + if (!elev) + return (_XUnknownNativeEvent(dpy, re, *event)); + *event = (xEvent *) elev; + + elev->type = ev->type; + elev->deviceid = ev->deviceid; + elev->root = ev->root; + elev->event = ev->window; + elev->child = ev->subwindow; + elev->time = ev->time; + elev->eventX = ev->x; + elev->eventY = ev->y; + elev->rootX = ev->x_root; + elev->rootY = ev->y_root; + elev->state = ev->state; + elev->mode = ev->mode; + break; + } default: return (_XUnknownNativeEvent(dpy, re, *event)); } |