From d1cfeaf0fe2c781eb1d07e8c9af4440259354f08 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 12 Nov 1997 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1997-11-12 --- port/devmouse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/port/devmouse.c b/port/devmouse.c index c2a56a3a3b9154edf85174712e2154213038011c..c2c76a7476c7629f716a684cadd31856601d81c0 100644 --- a/port/devmouse.c +++ b/port/devmouse.c @@ -418,11 +418,12 @@ m3mouseputc(void*, int c) short x; int dx, dy, newbuttons; - /* - * check bit 6 for consistency - */ if(nb==0){ - if((c&0x40) == 0){ + /* + * an extra byte comes for middle button motion. + * only two possible values for the extra byte. + */ + if(c == 0x00 || c == 0x20){ /* an extra byte gets sent for the middle button */ middle = (c&0x20) ? 2 : 0; newbuttons = (mouse.buttons & ~2) | middle;