aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/getevents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-27 08:37:02 +0200
committermarha <marha@users.sourceforge.net>2011-09-27 08:37:02 +0200
commit2233c44285f7e820f04abd07d6cf5eedbe32b8a3 (patch)
tree80d64c8daf68c57aaf3b6937cbd075161deaa3d2 /xorg-server/dix/getevents.c
parent95acf9816e008fa46a6c2fa2f35500deb358bb69 (diff)
parent183b7373f9919eeb5eb408f38578e01717b2cc10 (diff)
downloadvcxsrv-2233c44285f7e820f04abd07d6cf5eedbe32b8a3.tar.gz
vcxsrv-2233c44285f7e820f04abd07d6cf5eedbe32b8a3.tar.bz2
vcxsrv-2233c44285f7e820f04abd07d6cf5eedbe32b8a3.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/mesa/main/version.c xorg-server/include/globals.h xorg-server/mi/misprite.c xorg-server/mi/mivaltree.c xorg-server/os/utils.c
Diffstat (limited to 'xorg-server/dix/getevents.c')
-rw-r--r--xorg-server/dix/getevents.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 12f8ac7d0..6208a63af 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -169,17 +169,6 @@ key_autorepeats(DeviceIntPtr pDev, int key_code)
}
static void
-init_event(DeviceIntPtr dev, DeviceEvent* event, Time ms)
-{
- memset(event, 0, sizeof(DeviceEvent));
- event->header = ET_Internal;
- event->length = sizeof(DeviceEvent);
- event->time = ms;
- event->deviceid = dev->id;
- event->sourceid = dev->id;
-}
-
-static void
init_raw(DeviceIntPtr dev, RawDeviceEvent *event, Time ms, int type, int detail)
{
memset(event, 0, sizeof(RawDeviceEvent));
@@ -429,7 +418,6 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start,
Time current;
/* The size of a single motion event. */
int size;
- int dflt;
AxisInfo from, *to; /* for scaling */
INT32 *ocbuf, *icbuf; /* pointer to coordinates for copying */
INT16 *corebuf;
@@ -517,13 +505,6 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start,
else if (j == 1 && (from.max_value < from.min_value))
from.max_value = pScreen->height;
- if (j == 0 && (to->max_value < to->min_value))
- dflt = pScreen->width;
- else if (j == 1 && (to->max_value < to->min_value))
- dflt = pScreen->height;
- else
- dflt = 0;
-
/* scale from stored range into current range */
coord = rescaleValuatorAxis(coord, 0.0, NULL, &from, to, 0);
memcpy(ocbuf, &coord, sizeof(INT32));
@@ -1029,7 +1010,7 @@ GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
set_raw_valuators(raw, &mask, raw->valuators.data);
event = &events->device_event;
- init_event(pDev, event, ms);
+ init_device_event(event, pDev, ms);
event->detail.key = key_code;
if (type == KeyPress) {
@@ -1257,7 +1238,7 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, int buttons
clipValuators(pDev, &mask);
event = &events->device_event;
- init_event(pDev, event, ms);
+ init_device_event(event, pDev, ms);
if (type == MotionNotify) {
event->type = ET_Motion;
@@ -1350,7 +1331,7 @@ GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type, const Val
events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events);
event = &events->device_event;
- init_event(pDev, event, GetTimeInMillis());
+ init_device_event(event, pDev, GetTimeInMillis());
event->type = (type == ProximityIn) ? ET_ProximityIn : ET_ProximityOut;
clipValuators(pDev, &mask);
@@ -1386,7 +1367,7 @@ PostSyntheticMotion(DeviceIntPtr pDev,
#endif
memset(&ev, 0, sizeof(DeviceEvent));
- init_event(pDev, &ev, time);
+ init_device_event(&ev, pDev, time);
ev.root_x = x;
ev.root_y = y;
ev.type = ET_Motion;