VirtualBox

Changeset 47841 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Aug 19, 2013 1:20:58 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
88130
Message:

Main/Devices: reverted combined use of two emulated USB devices for reporting absolute events.

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r47758 r47841  
    24452445                || aPointingHID == PointingHIDType_USBTablet
    24462446                || aPointingHID == PointingHIDType_USBMultiTouch)
    2447             {
    24482447                InsertConfigNode(pUsbDevices, "HidMouse", &pDev);
     2448            if (aPointingHID == PointingHIDType_USBMouse)
     2449            {
    24492450                InsertConfigNode(pDev,     "0", &pInst);
    24502451                InsertConfigNode(pInst,    "Config", &pCfg);
     
    24602461                InsertConfigNode(pLunL1,   "Config", &pCfg);
    24612462                InsertConfigInteger(pCfg,  "Object",     (uintptr_t)pMouse);
    2462                 InsertConfigInteger(pCfg,  "Priority",   2);  /* Prefer over PS/2 */
    24632463            }
    24642464            if (   aPointingHID == PointingHIDType_USBTablet
  • trunk/src/VBox/Main/src-client/MouseImpl.cpp

    r47810 r47841  
    5959    /** The capabilities of this device. */
    6060    uint32_t                    u32DevCaps;
    61     /** The device priority. */
    62     uint32_t                    u32Priority;
    6361};
    6462
     
    439437                              bool fUsesVMMDevEvent)
    440438{
    441     HRESULT rc = S_OK;
     439    HRESULT rc;
    442440    /** If we are using the VMMDev to report absolute position but without
    443441     * VMMDev IRQ support then we need to send a small "jiggle" to the emulated
     
    445443    LONG cJiggle = 0;
    446444
    447     /*
    448      * Send the absolute mouse position to the device.
    449      */
    450     if (x != mcLastX || y != mcLastY)
    451     {
    452         if (vmmdevCanAbs())
     445    if (vmmdevCanAbs())
     446    {
     447        /*
     448         * Send the absolute mouse position to the VMM device.
     449         */
     450        if (x != mcLastX || y != mcLastY)
    453451        {
    454452            rc = reportAbsEventToVMMDev(x, y);
    455453            cJiggle = !fUsesVMMDevEvent;
    456454        }
    457         else
    458             rc = reportAbsEventToMouseDev(x, y, 0, 0, fButtons);
    459     }
    460     if (SUCCEEDED(rc))
    461455        rc = reportRelEventToMouseDev(cJiggle, 0, dz, dw, fButtons);
     456    }
     457    else
     458        rc = reportAbsEventToMouseDev(x, y, dz, dw, fButtons);
    462459
    463460    mcLastX = x;
     
    998995     * Validate configuration.
    999996     */
    1000     if (!CFGMR3AreValuesValid(pCfg, "Object\0Priority\0"))
     997    if (!CFGMR3AreValuesValid(pCfg, "Object\0"))
    1001998        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
    1002999    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER,
     
    10321029    }
    10331030    pThis->pMouse = (Mouse *)pv;        /** @todo Check this cast! */
    1034     /*
    1035      * Get the device priority.
    1036      */
    1037     rc = CFGMR3QueryU32Def(pCfg, "Priority", &pThis->u32Priority, 1);
    1038     if (RT_FAILURE(rc))
    1039     {
    1040         AssertMsgFailed(("Configuration error: Bad \"Priority\" value! rc=%Rrc\n", rc));
    1041         return rc;
    1042     }
    10431031    unsigned cDev;
    10441032    {
    1045         PDRVMAINMOUSE pObject = pThis;
    10461033        AutoReadLock mouseLock(pThis->pMouse COMMA_LOCKVAL_SRC_POS);
    10471034
    10481035        for (cDev = 0; cDev < MOUSE_MAX_DEVICES; ++cDev)
    1049             if (pThis->pMouse->mpDrv[cDev])
     1036            if (!pThis->pMouse->mpDrv[cDev])
    10501037            {
    1051                 /* Fix priorities. */
    1052                 if (   pThis->pMouse->mpDrv[cDev]->u32Priority
    1053                     <= pObject->u32Priority)
    1054                 {
    1055                     PDRVMAINMOUSE pNewObject = pThis->pMouse->mpDrv[cDev];
    1056                     pThis->pMouse->mpDrv[cDev] = pObject;
    1057                     pObject = pNewObject;
    1058                 }
    1059             }
    1060             else
    1061             {
    1062                 pThis->pMouse->mpDrv[cDev] = pObject;
     1038                pThis->pMouse->mpDrv[cDev] = pThis;
    10631039                break;
    10641040            }
Note: See TracChangeset for help on using the changeset viewer.

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