VirtualBox

Changeset 27208 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 9, 2010 12:31:03 PM (15 years ago)
Author:
vboxsync
Message:

Main/MouseImpl: some fixes and a todo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MouseImpl.cpp

    r27189 r27208  
    403403    if (FAILED(rc)) return rc;
    404404
    405     *pcX = displayWidth ? (x * 0xFFFF) / displayWidth: 0;
     405    *pcX = displayWidth ? ((x - 1) * 0xFFFF) / displayWidth: 0;
    406406    return S_OK;
    407407}
     
    422422    if (FAILED(rc)) return rc;
    423423
    424     *pcY = displayHeight ? (y * 0xFFFF) / displayHeight: 0;
     424    *pcY = displayHeight ? ((y - 1) * 0xFFFF) / displayHeight: 0;
    425425    return S_OK;
    426426}
     
    449449
    450450    uint32_t mouseXAbs;
     451    /** @todo the front end should do this conversion to avoid races */
    451452    HRESULT rc = convertDisplayWidth(x, &mouseXAbs);
    452453    if (FAILED(rc)) return rc;
     
    594595    {
    595596        AutoWriteLock mouseLock(pData->pMouse COMMA_LOCKVAL_SRC_POS);
    596         RT_ZERO(pData->pMouse->mpDrv);
     597        for (unsigned cDev = 0; cDev < MOUSE_MAX_DEVICES; ++cDev)
     598            if (pData->pMouse->mpDrv[cDev] == pData)
     599            {
     600                pData->pMouse->mpDrv[cDev] = NULL;
     601                break;
     602            }
    597603    }
    598604}
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