Ping? Wouldn't it be nice if wsmouse were more coherent again
in the next release?
On 05/14/2016 04:46 PM, Ulf Brosziewski wrote:
> The new input-processing functions of wsmouse seem to work well
> for touchpads, and it might be time to update the mouse drivers
> now. I start with the two drivers that I could test myself, hidms
> (ums) and pms.
>
> Please note that hidms can mix, in principle, absolute and relative
> coordinates. The new version doesn't change this property. I don't
> know whether it is really necessary.
>
> OK?
>
>
> Index: dev/hid/hidms.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/hid/hidms.c,v
> retrieving revision 1.2
> diff -u -p -r1.2 hidms.c
> --- dev/hid/hidms.c 10 Feb 2016 05:49:50 -0000 1.2
> +++ dev/hid/hidms.c 14 May 2016 13:47:06 -0000
> @@ -331,7 +331,6 @@ hidms_input(struct hidms *ms, uint8_t *d
> {
> int dx, dy, dz, dw;
> u_int32_t buttons = 0;
> - int flags;
> int i, s;
>
> DPRINTFN(5,("hidms_input: len=%d\n", len));
> @@ -358,12 +357,6 @@ hidms_input(struct hidms *ms, uint8_t *d
> return;
> }
>
> - flags = WSMOUSE_INPUT_DELTA;
> - if (ms->sc_flags & HIDMS_ABSX)
> - flags |= WSMOUSE_INPUT_ABSOLUTE_X;
> - if (ms->sc_flags & HIDMS_ABSY)
> - flags |= WSMOUSE_INPUT_ABSOLUTE_Y;
> -
> dx = hid_get_data(data, len, &ms->sc_loc_x);
> dy = -hid_get_data(data, len, &ms->sc_loc_y);
> dz = hid_get_data(data, len, &ms->sc_loc_z);
> @@ -403,8 +396,18 @@ hidms_input(struct hidms *ms, uint8_t *d
> ms->sc_buttons = buttons;
> if (ms->sc_wsmousedev != NULL) {
> s = spltty();
> - wsmouse_input(ms->sc_wsmousedev, buttons,
> - dx, dy, dz, dw, flags);
> + if (ms->sc_flags & HIDMS_ABSX) {
> + wsmouse_set(ms->sc_wsmousedev,
> + WSMOUSE_ABS_X, dx, 0);
> + dx = 0;
> + }
> + if (ms->sc_flags & HIDMS_ABSY) {
> + wsmouse_set(ms->sc_wsmousedev,
> + WSMOUSE_ABS_Y, dy, 0);
> + dy = 0;
> + }
> + WSMOUSE_INPUT(ms->sc_wsmousedev,
> + buttons, dx, dy, dz, dw);
> splx(s);
> }
> }
> Index: dev/pckbc/pms.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pckbc/pms.c,v
> retrieving revision 1.69
> diff -u -p -r1.69 pms.c
> --- dev/pckbc/pms.c 30 Mar 2016 23:34:12 -0000 1.69
> +++ dev/pckbc/pms.c 14 May 2016 13:47:06 -0000
> @@ -632,8 +632,7 @@ pms_proc_mouse(struct pms_softc *sc)
> else
> dz = 0;
>
> - wsmouse_input(sc->sc_wsmousedev,
> - buttons, dx, dy, dz, 0, WSMOUSE_INPUT_DELTA);
> + WSMOUSE_INPUT(sc->sc_wsmousedev, buttons, dx, dy, dz, 0);
> }
>
> int
>
>