aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/getevents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-05 15:13:41 +0000
committermarha <marha@users.sourceforge.net>2009-10-05 15:13:41 +0000
commit78db264e7992131e0781bdfa5ede821305262b2d (patch)
tree7461ae9dab5bf69f056250fc233c1ada393dc957 /xorg-server/dix/getevents.c
parent1d2fa791e7eb383cf2818bb2e33da546edbeade9 (diff)
parent77a4732b0637493966889fe3545966fdc12a1b5e (diff)
downloadvcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.gz
vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.bz2
vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/dix/getevents.c')
-rw-r--r--xorg-server/dix/getevents.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index ea6aa1376..eb1563aa4 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -586,12 +586,13 @@ GetMaximumEventsNum(void) {
static void
clipAxis(DeviceIntPtr pDev, int axisNum, int *val)
{
- AxisInfoPtr axis = pDev->valuator->axes + axisNum;
- /* InitValuatoraAxisStruct ensures that (min < max). */
+ AxisInfoPtr axis;
if (axisNum >= pDev->valuator->numAxes)
return;
+ axis = pDev->valuator->axes + axisNum;
+
/* If a value range is defined, clip. If not, do nothing */
if (axis->max_value <= axis->min_value)
return;
@@ -788,6 +789,19 @@ positionSprite(DeviceIntPtr dev, int *x, int *y, float x_frac, float y_frac,
*screeny_frac = dev->last.remainder[1];
}
+ /* Hit the left screen edge? */
+ if (*screenx <= 0 && *screenx_frac < 0.0f)
+ {
+ *screenx_frac = 0.0f;
+ x_frac = 0.0f;
+ }
+ if (*screeny <= 0 && *screeny_frac < 0.0f)
+ {
+ *screeny_frac = 0.0f;
+ y_frac = 0.0f;
+ }
+
+
old_screenx = *screenx;
old_screeny = *screeny;
/* This takes care of crossing screens for us, as well as clipping