Index: [thread] [date] [subject] [author]
  From: Christoph Egger <Christoph_Egger@t-online.de>
  To  : ggi-develop@eskimo.com
  Date: Sun, 20 Jun 1999 08:52:56 +0200 (MEST)

Re: libgii - mysterious mouse implementation

On Sat, 19 Jun 1999, Andreas Beck wrote:

> Hi !
> 
> > > BTW: When I look at your patch, I get the impression, that one cannot press
> > > the middle button together with the outer buttons. Is that correct ?
> 
> > No. Inputdump recognizes all pressed buttons as expected (when I use the
> > second patch above). But inputdump doesn't recognize the middle mouse
> > button, when I am moving the mouse... :-(
> 
> O.K. - so if it works nicely, we should include it in our sources, right ?

Yes.
> 
> Could you resend me the right patch ? I'll then take care for including it.

Of course. Here is it:

--- input/mouse/packetparse.c.old       Wed Apr  7 16:24:59 1999
+++ input/mouse/packetparse.c   Thu Apr  8 14:07:23 1999
@@ -128,9 +132,32 @@
        dx = (sint8) (((buf[0] & 0x03) << 6) | (buf[1] & 0x3f));
        dy = (sint8) (((buf[0] & 0x0c) << 4) | (buf[2] & 0x3f));

-       buttons = ((buf[0] & 0x10) >> 3)
-               | ((buf[0] & 0x20) >> 5);
+       /* third button added by Christoph Egger
(Christoph_Egger@t-online.de) */
+       if (buf[0] == 0x40 && !(mpriv->button_state|buf[1]|buf[2]))
+               buttons = 4; /* third button on MS compatible mouse */
+       else
+               buttons = ((buf[0] & 0x10) >> 3)
+                       | ((buf[0] & 0x20) >> 5);


Cheers,


Christoph Egger
E-Mail: Christoph_Egger@t-online.de

Index: [thread] [date] [subject] [author]