Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hpcmips/vr Mouse move event should be made before m...
details: https://anonhg.NetBSD.org/src/rev/2881de8a7fc4
branches: trunk
changeset: 485736:2881de8a7fc4
user: takemura <takemura%NetBSD.org@localhost>
date: Thu May 04 06:14:05 2000 +0000
description:
Mouse move event should be made before mouse bown event. Without that,
you may got a mouse down event in strange plase.
diffstat:
sys/arch/hpcmips/vr/vrpiu.c | 56 ++++++++++++++++++++++----------------------
1 files changed, 28 insertions(+), 28 deletions(-)
diffs (84 lines):
diff -r 91b8b65dfa79 -r 2881de8a7fc4 sys/arch/hpcmips/vr/vrpiu.c
--- a/sys/arch/hpcmips/vr/vrpiu.c Thu May 04 06:10:53 2000 +0000
+++ b/sys/arch/hpcmips/vr/vrpiu.c Thu May 04 06:14:05 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vrpiu.c,v 1.3 2000/01/10 14:08:03 takemura Exp $ */
+/* $NetBSD: vrpiu.c,v 1.4 2000/05/04 06:14:05 takemura Exp $ */
/*
* Copyright (c) 1999 Shin Takemura All rights reserved.
@@ -358,32 +358,6 @@
DPRINTF((" PENCHG"));
DPRINTF(("\n"));
#endif
- if (cnt & PIUCNT_PENSTC) {
- if (sc->sc_stat == VRPIU_STAT_RELEASE) {
- /*
- * pen touch
- */
- DPRINTF(("PEN TOUCH\n"));
- sc->sc_stat = VRPIU_STAT_TOUCH;
- /* button 0 DOWN */
- wsmouse_input(sc->sc_wsmousedev,
- (1 << 0),
- 0, 0, 0, 0);
- }
- } else {
- if (sc->sc_stat == VRPIU_STAT_TOUCH) {
- /*
- * pen release
- */
- DPRINTF(("RELEASE\n"));
- sc->sc_stat = VRPIU_STAT_RELEASE;
- /* button 0 UP */
- wsmouse_input(sc->sc_wsmousedev,
- 0,
- 0, 0, 0, 0);
- }
- }
-
if (intrstat & (PIUINT_PADPAGE0INTR | PIUINT_PADPAGE1INTR)) {
if (!((tpx0 & PIUPB_VALID) && (tpx1 & PIUPB_VALID) &&
(tpy0 & PIUPB_VALID) && (tpy1 & PIUPB_VALID))) {
@@ -400,7 +374,7 @@
DPRINTF(("%04x %04x %04x %04x\n",
tpx0, tpx1, tpy0, tpy1));
DPRINTF(("%3d %3d (%4d %4d)->", tpx0, tpy0,
- tpx0 + tpx1, tpy0 + tpy1);
+ tpx0 + tpx1, tpy0 + tpy1));
#endif
xraw = tpy1 * 1024 / (tpy0 + tpy1);
yraw = tpx1 * 1024 / (tpx0 + tpx1);
@@ -422,6 +396,32 @@
}
}
+ if (cnt & PIUCNT_PENSTC) {
+ if (sc->sc_stat == VRPIU_STAT_RELEASE) {
+ /*
+ * pen touch
+ */
+ DPRINTF(("PEN TOUCH\n"));
+ sc->sc_stat = VRPIU_STAT_TOUCH;
+ /*
+ * We should not report button down event while
+ * we don't know where it occur.
+ */
+ }
+ } else {
+ if (sc->sc_stat == VRPIU_STAT_TOUCH) {
+ /*
+ * pen release
+ */
+ DPRINTF(("RELEASE\n"));
+ sc->sc_stat = VRPIU_STAT_RELEASE;
+ /* button 0 UP */
+ wsmouse_input(sc->sc_wsmousedev,
+ 0,
+ 0, 0, 0, 0);
+ }
+ }
+
if (intrstat & PIUINT_PADDLOSTINTR) {
cnt |= PIUCNT_PIUSEQEN;
vrpiu_write(sc, PIUCNT_REG_W, cnt);
Home |
Main Index |
Thread Index |
Old Index