VirtualBox

Changeset 59882 in vbox


Ignore:
Timestamp:
Mar 1, 2016 10:43:06 AM (9 years ago)
Author:
vboxsync
Message:

VBoxMouse: bugref:8260: Windows mouse filter should use correct device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Mouse/NT5/VBoxMFInternal.cpp

    r58178 r59882  
    216216    KeAcquireSpinLock(&g_ctx.SyncLock, &Irql);
    217217    InsertHeadList(&g_ctx.DevExtList, &pDevExt->ListEntry);
    218     if (!g_ctx.pCurrentDevExt)
     218    /* g_ctx.pCurrentDevExt must be associated with the i8042prt device. */
     219    if (pDevExt->bHostMouse && !g_ctx.pCurrentDevExt)
    219220    {
    220221        ASMAtomicWritePtr(&g_ctx.pCurrentDevExt, pDevExt);
     
    243244    if (g_ctx.pCurrentDevExt == pDevExt)
    244245    {
     246        /* The PS/2 mouse is being removed. Usually never happens. */
    245247        ObDereferenceObject(pDevExt->pdoSelf);
    246248        g_ctx.pCurrentDevExt = NULL;
    247         for (PLIST_ENTRY pCur = g_ctx.DevExtList.Flink; pCur != &g_ctx.DevExtList; pCur = pCur->Flink)
    248         {
    249             PVBOXMOUSE_DEVEXT pNewCurDevExt = PVBOXMOUSE_DEVEXT_FROM_LE(pCur);
    250             ASMAtomicWritePtr(&g_ctx.pCurrentDevExt, pNewCurDevExt);
    251             /* ensure the object is not deleted while it is being used by a poller thread */
    252             ObReferenceObject(pNewCurDevExt->pdoSelf);
    253             break;
    254         }
    255249    }
    256250
     
    347341        }
    348342    }
    349 
    350     vboxNewProtDeviceAdded(pDevExt);
    351343
    352344    if (!vboxIsHostMouseFound())
     
    424416        }
    425417    }
     418
     419    /* Finally call the handler, which needs a correct pDevExt->bHostMouse value. */
     420    vboxNewProtDeviceAdded(pDevExt);
     421
    426422    LOGF_LEAVE();
    427423}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette