From pavel@Elf.cz Sun Jun 23 12:14:57 1996
Return-Path: pavel@Elf.cz
Received: from systemy.systemy.it (systemy.systemy.it [194.20.140.20]) by pop.systemy.it (8.6.9/8.6.9) with SMTP id MAA00966 for <rubini@pop.systemy.it>; Sun, 23 Jun 1996 12:13:42 +0200
Received: from systemy.systemy.it by systemy.systemy.it with smtp
	(Smail3.1.29.1 #4) id m0uXn8i-000AUkC; Sun, 23 Jun 96 11:15 GMT
Received: from ICIL64.CILEA.IT by systemy.systemy.it with smtp
	(Smail3.1.29.1 #4) id m0uXn8e-000ALgC; Sun, 23 Jun 96 11:15 GMT
Received: from iride.unipv.it by ICIL64.CILEA.IT (PMDF V5.0-6 #12116)
 id <01I68ZMYQD3K008Q1K@ICIL64.CILEA.IT> for rubini@systemy.it; Sun,
 23 Jun 1996 13:16:25 +0000 (MET-01DST)
Received: from ipvvis.unipv.it by iride.unipv.it with SMTP (16.8/16.2)
 id AA25754; Sun, 23 Jun 1996 13:16:12 +0200
Received: from Elf.cz ([194.50.16.209]) by ipvvis.unipv.it (4.1/SMI-4.0)
 id AA29820; Sun, 23 Jun 1996 13:14:29 +0100
Received: (from pavel@localhost) by Elf.cz (8.7.5/8.7.3)
 id MAA00221 for rubini@ipvvis.unipv.it; Sun, 23 Jun 1996 12:30:26 +0200
Date: Sun, 23 Jun 1996 12:30:25 +0200 (MET DST)
From: pavel <pavel@Elf.cz>
Subject: Gpm - patch to make it running with LogiMouse(s)
To: rubini@ipvvis.unipv.it
Reply-to: machek@k332.feld.cvut.cz
Message-id: <199606231030.MAA00221@Elf.cz>
MIME-version: 1.0
X-Mailer: ELM [version 2.4 PL25]
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7bit
Status: RO

Reply-To: machek@k332.feld.cvut.cz

LoginMouses are pretty inteligent things in most cases - and that's
the problem. They have plenty of emulation modes - they start as
normal mouse systems mouse, but once they meet logitech mouse driver
they turn themselves to some other protocol. 

Trouble is, that gpm then works in exactly in one of two cases
case 1: Computer powered up and booted linux
case 2: Computer powered up, booted dos with logitech driver, reboot,
linux.

This patch corrects it: Forces logimouse into mouse systems mode.

Please note, that "From:" address is INVALID, use
machek@k332.feld.cvut.cz instead.

Begin patch...
--- mice.c	Sat Jun 15 01:18:08 1996
+++ mice.c.old	Sun May  5 22:05:15 1996
@@ -124,14 +124,6 @@
   return 0;
 }
 
-static int M_logimsc(Gpm_Event *state,  unsigned char *data)	/* Equal to msc	*/
-{
-  state->buttons= (~data[0]) & 0x07;
-  state->dx=      (char)(data[1]) + (char)(data[3]);
-  state->dy=     -((char)(data[2]) + (char)(data[4]));
-  return 0;
-}
-
 static int M_mm(Gpm_Event *state,  unsigned char *data)
 {
   state->buttons= data[0] & 0x07;
@@ -400,9 +392,6 @@
 	break;
 	}
 
-  if (type->fun==M_logimsc)
-    write(fd, "QU", 2 );
-
   if (type->fun==M_ms && i==2 && c==0x33) /* Aha.. a mouseman... */
 	{
 	LOG(("MouseMan detected"));
@@ -508,9 +497,7 @@
   {"wacom",  "Wacom tablet",
            "", M_wacom, NULL, PROTO_WACOM, STD_FLG,
                                 {0x80, 0x80, 0x80, 0x00}, 7, 7, 0, 0},
-  {"logim",  "Turn logitech into Mouse-Systems-Compatible. Req'd on my computer.",
-           "LogiMouse", M_logimsc, I_serial, PROTO_MSC, CS8 | CSTOPB | STD_FLG,
-                                {0xf8, 0x80, 0x00, 0x00}, 5, 1, 0, 0},
+
   {"",     "",
            "", NULL, NULL, PROTO_UNKNOWN, 0,
                                 {0x00, 0x00, 0x00, 0x00}, 0, 0, 0, 0}
@@ -533,9 +520,6 @@
 
 return 1; /* to exit() */
 }
-
-
-
 
 
 
End patch.

						Pavel Machek
					<machek@k332.feld.cvut.cz>




