diff options
author | 2013-10-30 18:00:56 +0000 | |
---|---|---|
committer | 2013-10-30 18:00:56 +0000 | |
commit | ec3f58595815e3b90cd6e71cdc98fae30d7ea137 (patch) | |
tree | 10950e32394c2db6492d454d84447b799fb35d49 | |
parent | use more careful format strings to deal with various forms of AS#'s (diff) | |
download | wireguard-openbsd-ec3f58595815e3b90cd6e71cdc98fae30d7ea137.tar.xz wireguard-openbsd-ec3f58595815e3b90cd6e71cdc98fae30d7ea137.zip |
Fix jagged diagonal lines (kernel part)
Send WSCONS_EVENT_SYNC every time you call wsmouse_input(). Used to synchronize
and separate events into packets of input data changes occurring at the same
moment in time. For example, motion of a mouse may set the DELTA_X and DELTA_Y
values for one motion, then emit a SYNC.
ok matthieu@. tested edd@, Henri Kemppainen and Alf Schlichting.
-rw-r--r-- | sys/dev/pckbc/pms.c | 11 | ||||
-rw-r--r-- | sys/dev/wscons/wsmouse.c | 14 | ||||
-rw-r--r-- | sys/dev/wscons/wsmousevar.h | 3 |
3 files changed, 11 insertions, 17 deletions
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c index e68bcaddfc9..af1b9087357 100644 --- a/sys/dev/pckbc/pms.c +++ b/sys/dev/pckbc/pms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pms.c,v 1.48 2013/09/20 14:07:30 stsp Exp $ */ +/* $OpenBSD: pms.c,v 1.49 2013/10/30 18:00:56 shadchin Exp $ */ /* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */ /*- @@ -1155,8 +1155,7 @@ pms_proc_synaptics(struct pms_softc *sc) if (syn->wsmode == WSMOUSE_NATIVE) { wsmouse_input(sc->sc_wsmousedev, buttons, x, y, z, w, WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y | - WSMOUSE_INPUT_ABSOLUTE_Z | WSMOUSE_INPUT_ABSOLUTE_W | - WSMOUSE_INPUT_SYNC); + WSMOUSE_INPUT_ABSOLUTE_Z | WSMOUSE_INPUT_ABSOLUTE_W); } else { dx = dy = 0; if (z > SYNAPTICS_PRESSURE) { @@ -1470,8 +1469,7 @@ pms_proc_alps(struct pms_softc *sc) wsmouse_input(sc->sc_wsmousedev, buttons, x, y, z, w, WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y | - WSMOUSE_INPUT_ABSOLUTE_Z | WSMOUSE_INPUT_ABSOLUTE_W | - WSMOUSE_INPUT_SYNC); + WSMOUSE_INPUT_ABSOLUTE_Z | WSMOUSE_INPUT_ABSOLUTE_W); alps->old_fin = fin; } else { @@ -2321,8 +2319,7 @@ elantech_send_input(struct pms_softc *sc, int x, int y, int z, int w) WSMOUSE_INPUT_ABSOLUTE_X | WSMOUSE_INPUT_ABSOLUTE_Y | WSMOUSE_INPUT_ABSOLUTE_Z | - WSMOUSE_INPUT_ABSOLUTE_W | - WSMOUSE_INPUT_SYNC); + WSMOUSE_INPUT_ABSOLUTE_W); } else { dx = dy = 0; diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c index 889c650d69d..3cfafbca0ed 100644 --- a/sys/dev/wscons/wsmouse.c +++ b/sys/dev/wscons/wsmouse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmouse.c,v 1.24 2013/10/18 13:54:09 miod Exp $ */ +/* $OpenBSD: wsmouse.c,v 1.25 2013/10/30 18:00:57 shadchin Exp $ */ /* $NetBSD: wsmouse.c,v 1.35 2005/02/27 00:27:52 perry Exp $ */ /* @@ -452,13 +452,11 @@ wsmouse_input(struct device *wsmousedev, u_int btns, /* 0 is up */ ub ^= d; } - if (flags & WSMOUSE_INPUT_SYNC) { - NEXT; - ev->type = WSCONS_EVENT_SYNC; - ev->value = 0; - TIMESTAMP; - ADVANCE; - } + NEXT; + ev->type = WSCONS_EVENT_SYNC; + ev->value = 0; + TIMESTAMP; + ADVANCE; /* XXX fake wscons_event notifying wsmoused(8) to close mouse device */ if (flags & WSMOUSE_INPUT_WSMOUSED_CLOSE) { diff --git a/sys/dev/wscons/wsmousevar.h b/sys/dev/wscons/wsmousevar.h index 68d8f342b94..ae0f479eb34 100644 --- a/sys/dev/wscons/wsmousevar.h +++ b/sys/dev/wscons/wsmousevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmousevar.h,v 1.6 2012/07/22 18:28:36 shadchin Exp $ */ +/* $OpenBSD: wsmousevar.h,v 1.7 2013/10/30 18:00:57 shadchin Exp $ */ /* $NetBSD: wsmousevar.h,v 1.4 2000/01/08 02:57:24 takemura Exp $ */ /* @@ -74,7 +74,6 @@ int wsmousedevprint(void *, const char *); #define WSMOUSE_INPUT_WSMOUSED_CLOSE (1<<3) /* notify wsmoused(8) to close mouse device */ #define WSMOUSE_INPUT_ABSOLUTE_W (1<<4) -#define WSMOUSE_INPUT_SYNC (1<<5) void wsmouse_input(struct device *kbddev, u_int btns, int x, int y, int z, int w, u_int flags); |