summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@openbsd.org>2009-11-25 17:59:42 +0000
committerMatthieu Herrb <matthieu@openbsd.org>2009-11-25 17:59:42 +0000
commit831bb07f5a83643029db935275eea123a3b183a7 (patch)
tree48240ab8c67cadb0800662251e14acafa0732fc8
parentd14402196704bad266bc02f4a1fab950866d50cf (diff)
Send events upstreams one axis at a time.
-rw-r--r--src/ws.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/ws.c b/src/ws.c
index c7e18ed..fb99465 100644
--- a/src/ws.c
+++ b/src/ws.c
@@ -643,19 +643,8 @@ wsReadInput(InputInfoPtr pInfo)
/* relative motion event */
DBG(3, ErrorF("postMotionEvent dX %d dY %d\n",
dx, dy));
-#if 0
- priv->x += dx;
- if (priv->x < priv->min_x) priv->x = priv->min_x;
- if (priv->x > priv->max_x) priv->x = priv->max_x;
- priv->y += dy;
- if (priv->y < priv->min_y) priv->y = priv->min_y;
- if (priv->y > priv->max_y) priv->y = priv->max_y;
- xf86PostMotionEvent(pInfo->dev, 1, 0, 2,
- priv->x, priv->y);
-#else
xf86PostMotionEvent(pInfo->dev, 0, 0, 2,
dx, dy);
-#endif
}
if (dz && priv->negativeZ != WS_NOZMAP
&& priv->positiveZ != WS_NOZMAP) {
@@ -698,16 +687,14 @@ wsReadInput(InputInfoPtr pInfo)
}
if (ax) {
/* absolute position event */
- DBG(3, ErrorF("postMotionEvent X %d %d\n",
- ax, priv->y));
- xf86PostMotionEvent(pInfo->dev, 1, 0, 2, ax, priv->y);
+ DBG(3, ErrorF("postMotionEvent X %d\n", ax));
+ xf86PostMotionEvent(pInfo->dev, 1, 0, 1, ax);
priv->x = ax;
}
if (ay) {
/* absolute position event */
- DBG(3, ErrorF("postMotionEvent y %d %d\n",
- priv->x, ay));
- xf86PostMotionEvent(pInfo->dev, 1, 0, 2, priv->x, ay);
+ DBG(3, ErrorF("postMotionEvent y %d\n", ay));
+ xf86PostMotionEvent(pInfo->dev, 1, 1, 1, ay);
priv->y = ay;
}
++event;
@@ -726,7 +713,7 @@ wsSendButtons(InputInfoPtr pInfo, int buttons)
if ((mask & priv->lastButtons) != (mask & buttons)) {
xf86PostButtonEvent(pInfo->dev, TRUE,
button, (buttons & mask) != 0,
- 0, 0); /*2, priv->x, priv->y);*/
+ 0, 0);
DBG(3, ErrorF("post button event %d %d\n",
button, (buttons & mask) != 0))
}