--- a/src/sun_mouse.c Thu Jan 9 15:08:10 2014
+++ b/src/sun_mouse.c Fri Jan 10 10:22:04 2014
@@ -623,7 +623,7 @@
{
InputInfoPtr pInfo;
MouseDevPtr pMse;
- VuidMsePtr pVuidMse;
+ VuidMsePtr pVuidMse, m;
int ret = Success;
int i;
@@ -702,8 +702,20 @@
}
break;
- case DEVICE_OFF:
case DEVICE_CLOSE:
+ m = vuidMouseList;
+
+ if (m == pVuidMse)
+ vuidMouseList = m->next;
+ else {
+ while ((m != NULL) && (m->next != pVuidMse)) {
+ m = m->next;
+ }
+
+ if (m != NULL)
+ m->next = pVuidMse->next;
+ }
+ case DEVICE_OFF:
if (pInfo->fd != -1) {
if (pVuidMse->strmod) {
SYSCALL(i = ioctl(pInfo->fd, I_POP, pVuidMse->strmod));