Author: wmb
Date: 2008-10-05 22:00:00 +0200 (Sun, 05 Oct 2008)
New Revision: 981
Modified:
dev/olpc/touchpad/touchpad.fth
Log:
OLPC trac 8451 - Handle "test /mouse" issues raised by comment 9 of that ticket.
Mostly cosmetic, but also slightly more robust handling of protocol botches.
Modified: dev/olpc/touchpad/touchpad.fth
===================================================================
--- dev/olpc/touchpad/touchpad.fth 2008-10-05 09:37:37 UTC (rev 980)
+++ dev/olpc/touchpad/touchpad.fth 2008-10-05 20:00:00 UTC (rev 981)
@@ -271,8 +271,8 @@
endof
( default )
\ If the high bit is set it means it's the first byte
- \ of a packet. Abort if we don't recognize the type.
- dup h# 80 and abort" Touchpad protocol botch"
+ \ of a packet. Complain if we don't recognize the type.
+ dup h# 80 and if ." Protocol botch" then
\ If the high bit is not set, we have missed a start of packet
miss? @ 0= if ." miss " then
@@ -417,6 +417,9 @@
cursor-off track-init start
+ \ Consume already-queued keys to prevent premature exit
+ begin key? while key drop repeat
+
background
gs-only
begin
@@ -441,6 +444,7 @@
until
close
+ page
0
;