Also provide differential coordinate updates... pitty it can't be choosen

or specified in wscons itself. The absolute coordinates are broadcasted
_after_ the relative so a program that takes both won't get confused.
This commit is contained in:
reinoud 2002-04-04 01:03:23 +00:00
parent 9f1d1d933d
commit c85015ee71

View File

@ -1,4 +1,4 @@
/* $NetBSD: wsqms.c,v 1.3 2002/03/17 19:40:33 atatat Exp $ */
/* $NetBSD: wsqms.c,v 1.4 2002/04/04 01:03:23 reinoud Exp $ */
/*-
* Copyright (c) 2001 Reinoud Zandijk
@ -163,11 +163,6 @@ wsqms_intr(arg)
b = ~( ((b & 1)<<2) | (b & 2) | ((b & 4)>>2));
if ((x != sc->lastx) || (y != sc->lasty) || (b != sc->lastb)) {
/* save old values */
sc->lastx = x;
sc->lasty = y;
sc->lastb = b;
/* do we have to bound x and y ? => yes */
if (x < -MAX_XYREG) x = -MAX_XYREG;
if (x > MAX_XYREG) x = MAX_XYREG;
@ -178,8 +173,15 @@ wsqms_intr(arg)
bus_space_write_4(sc->sc_iot, sc->sc_ioh, QMS_MOUSEX, x);
bus_space_write_4(sc->sc_iot, sc->sc_ioh, QMS_MOUSEY, y);
wsmouse_input(sc->sc_wsmousedev, b, x - sc->lastx, y - sc->lasty, 0,
WSMOUSE_INPUT_DELTA);
wsmouse_input(sc->sc_wsmousedev, b, x, y, 0,
WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y);
/* save old values */
sc->lastx = x;
sc->lasty = y;
sc->lastb = b;
};
return (0); /* pass on */