VirtualBox

Changeset 38892 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 28, 2011 8:47:43 AM (13 years ago)
Author:
vboxsync
Message:

Additions/common/VBoxGuest: do not send mouse status updates to the host if nothing has changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r38856 r38892  
    20492049
    20502050/**
    2051  * Sets the mouse status features for this session and updates them globally.
     2051 * Sets the mouse status features for this session and updates them
     2052 * globally.  We aim to ensure that if several threads call this in
     2053 * parallel the most recent status will always end up being set.
    20522054 *
    20532055 * @returns VBox status code.
     
    20632065    uint32_t fNewDevExtStatus = 0;
    20642066    int rc;
     2067    /* Exit early if nothing has changed - hack to work around the
     2068     * Windows Additions not using the common code. */
     2069    bool fNoAction;
    20652070
    20662071    RTSpinlockAcquireNoInts(pDevExt->SessionSpinlock, &Tmp);
     
    20802085    }
    20812086    pSession->fMouseStatus = fFeatures & VMMDEV_MOUSE_GUEST_MASK;
     2087    fNoAction = (pDevExt->fMouseStatus == fNewDevExtStatus);
    20822088    pDevExt->fMouseStatus = fNewDevExtStatus;
    20832089    RTSpinlockReleaseNoInts(pDevExt->SessionSpinlock, &Tmp);
     2090    if (fNoAction)
     2091        return VINF_SUCCESS;
    20842092    do
    20852093    {
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