small cleanup xf86-input-mouse

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexandr Shadchin
Date: Sunday, November 21, 2010 - 11:19 am

Now SunMouse works through wsmouse(sunms add miod@ 20 May 2009)
so we can remove our patch to SunMouse for xf86-input-mouse.

Right? OK?

-- 
Alexandr Shadchin

Index: driver/xf86-input-mouse/src/mouse.c
===================================================================
RCS file: /cvs/xenocara/driver/xf86-input-mouse/src/mouse.c,v
retrieving revision 1.8
diff -u -p -r1.8 mouse.c
--- driver/xf86-input-mouse/src/mouse.c	21 Nov 2010 15:13:52 -0000	1.8
+++ driver/xf86-input-mouse/src/mouse.c	21 Nov 2010 15:51:50 -0000
@@ -253,7 +253,6 @@ static MouseProtocolRec mouseProtocols[]
     { "IntelliMouse",		MSE_SERIAL,	msDefaults,	PROT_IMSERIAL },
     { "ThinkingMouse",		MSE_SERIAL,	msDefaults,	PROT_THINKING },
     { "AceCad",			MSE_SERIAL,	acecadDefaults,	PROT_ACECAD },
-    { "SunMouse",		MSE_SERIAL,	mlDefaults,	PROT_SUNMOUSE },
     { "ValuMouseScroll",	MSE_SERIAL,	msDefaults,	PROT_VALUMOUSESCROLL },
 
     /* Standard PS/2 */
@@ -282,8 +281,6 @@ static MouseProtocolRec mouseProtocols[]
     { NULL,			MSE_NONE,	NULL,		PROT_UNKNOWN }
 };
 
-static unsigned char proto[PROT_NUMPROTOS][8];
-
 /* Process options common to all mouse types. */
 static void
 MouseCommonOptions(InputInfoPtr pInfo)
@@ -1268,14 +1265,6 @@ MouseReadInput(InputInfoPtr pInfo)
 	    for (j = 0; j < pBufP; j++)
 		pBuf[j] = pBuf[j+1];
 	    pMse->inSync = 0;
-
-	    /* If SunMouse gets a 5 byte packet, switch to MouseSystems */
-	    if (!baddata && pMse->protocolID == PROT_SUNMOUSE &&
-		(u & pMse->protoPara[5]) == pMse->protoPara[6]) {
-		    pMse->protocolID = PROT_MSC;
-		    memcpy(pMse->protoPara, proto[pMse->protocolID],
-			sizeof(pMse->protoPara));
-	    }
 	    continue;
 	}
 	/* Tell auto probe that we were successful */
@@ -1323,7 +1312,6 @@ MouseReadInput(InputInfoPtr pInfo)
 	    break;
 
 	case PROT_MSC:		/* Mouse Systems Corp */
-	case PROT_SUNMOUSE:
 	    buttons = (~pBuf[0]) & 0x07;
 	    dx =    (signed char)(pBuf[1]) + (char)(pBuf[3]);
 	    dy = - ((signed char)(pBuf[2]) + (char)(pBuf[4]));
@@ -2428,7 +2416,6 @@ static unsigned char proto[PROT_NUMPROTO
   {  0xf8, 0x80, 0x00, 0x00,  5,   0x00, 0xff, MPF_NONE },  /* BusMouse */
   {  0xf8, 0x80, 0x00, 0x00,  5,   0x00, 0xff, MPF_NONE },  /* Auto (dummy) */
   {  0xf8, 0x80, 0x00, 0x00,  8,   0x00, 0xff, MPF_NONE },  /* SysMouse */
-  {  0xf8, 0x88, 0x00, 0x00,  3,   0xf8, 0x80, MPF_SAFE },  /* SunMouse */
 };
 
 
@@ -2727,7 +2714,6 @@ initMouseHW(InputInfoPtr pInfo)
 	    break;
 
 	case PROT_MSC:		/* MouseSystems Corp */
-	case PROT_SUNMOUSE:
 	    usleep(100000);
 	    xf86FlushInput(pInfo->fd);
 	    break;
Index: driver/xf86-input-mouse/src/xf86OSmouse.h
===================================================================
RCS file: /cvs/xenocara/driver/xf86-input-mouse/src/xf86OSmouse.h,v
retrieving revision 1.2
diff -u -p -r1.2 xf86OSmouse.h
--- driver/xf86-input-mouse/src/xf86OSmouse.h	21 Nov 2010 15:13:52 -0000	1.2
+++ driver/xf86-input-mouse/src/xf86OSmouse.h	21 Nov 2010 15:51:51 -0000
@@ -70,7 +70,6 @@ typedef enum {
     PROT_BM,
     PROT_AUTO,
     PROT_SYSMOUSE,
-    PROT_SUNMOUSE,
     PROT_NUMPROTOS	/* This must always be last. */
 } MouseProtocolID;
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
small cleanup xf86-input-mouse, Alexandr Shadchin, (Sun Nov 21, 11:19 am)
Re: small cleanup xf86-input-mouse, Miod Vallat, (Mon Nov 22, 11:28 am)
Re: small cleanup xf86-input-mouse, Matthieu Herrb, (Mon Nov 22, 12:33 pm)
Re: small cleanup xf86-input-mouse, Miod Vallat, (Mon Nov 22, 12:42 pm)
Re: small cleanup xf86-input-mouse, Alexandr Shadchin, (Tue Nov 23, 2:03 am)