VirtualBox

Changeset 22268 in vbox


Ignore:
Timestamp:
Aug 14, 2009 5:03:36 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51107
Message:

Devices/VMMDev: do not hide the mouse pointer after a restore from saved unless the guest wants to

Location:
trunk/src/VBox/Devices/VMMDev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r22096 r22268  
    707707                                                       NULL);
    708708                }
     709                pThis->fHostCursorRequested = fVisible;
    709710                pRequestHeader->rc = VINF_SUCCESS;
    710711            }
     
    20852086
    20862087
    2087 #define VMMDEV_SSM_VERSION  9
     2088#define VMMDEV_SSM_VERSION  10
    20882089
    20892090/**
     
    21202121#endif /* VBOX_WITH_HGCM */
    21212122
     2123    SSMR3PutU32(pSSMHandle, pThis->fHostCursorRequested);
     2124
    21222125    return VINF_SUCCESS;
    21232126}
     
    21662169        SSMR3GetU32(pSSMHandle, &temp);
    21672170    }
    2168 
    21692171#ifdef VBOX_WITH_HGCM
    21702172    vmmdevHGCMLoadState (pThis, pSSMHandle, u32Version);
    21712173#endif /* VBOX_WITH_HGCM */
     2174
     2175    if (   SSM_VERSION_MAJOR(u32Version) ==  0
     2176        && SSM_VERSION_MINOR(u32Version) >= 10)
     2177        SSMR3GetU32(pSSMHandle, &pThis->fHostCursorRequested);
    21722178
    21732179    /*
     
    21772183    Log(("vmmdevLoadState: capabilities changed (%x), informing connector\n", pThis->mouseCapabilities));
    21782184    if (pThis->pDrv)
     2185    {
    21792186        pThis->pDrv->pfnUpdateMouseCapabilities(pThis->pDrv, pThis->mouseCapabilities);
     2187        if (   SSM_VERSION_MAJOR(u32Version) ==  0
     2188            && SSM_VERSION_MINOR(u32Version) >= 10)
     2189                pThis->pDrv->pfnUpdatePointerShape(pThis->pDrv,
     2190                                                   pThis->fHostCursorRequested,
     2191                                                   0,
     2192                                                   0, 0,
     2193                                                   0, 0,
     2194                                                   NULL);
     2195    }
    21802196
    21812197    /* Reestablish the acceleration status. */
     
    24642480
    24652481    /*
    2466      * Reset the mouse integration feature bit
     2482     * Reset the mouse integration feature bits
    24672483     */
    2468     if (pThis->mouseCapabilities & (VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE|VMMDEV_MOUSE_GUEST_NEEDS_HOST_CURSOR))
    2469     {
    2470         pThis->mouseCapabilities &= ~VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE;
     2484    if (pThis->mouseCapabilities & VMMDEV_MOUSE_GUEST_MASK)
     2485    {
     2486        pThis->mouseCapabilities &= ~VMMDEV_MOUSE_GUEST_MASK;
    24712487        /* notify the connector */
    24722488        Log(("vmmdevReset: capabilities changed (%x), informing connector\n", pThis->mouseCapabilities));
    24732489        pThis->pDrv->pfnUpdateMouseCapabilities(pThis->pDrv, pThis->mouseCapabilities);
    24742490    }
     2491    pThis->fHostCursorRequested = false;
    24752492
    24762493    pThis->hypervisorSize = 0;
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r21227 r22268  
    3838    uint32_t hypervisorSize;
    3939
    40     /** bit 0: guest capability (1 == wants), bit 1: flag value has changed */
    41     /** bit 2: host capability (1 == wants), bit 3: flag value has changed */
     40    /** mouse capabilities of host and guest */
    4241    uint32_t mouseCapabilities;
    4342    /** absolute mouse position in pixels */
    4443    uint32_t mouseXAbs;
    4544    uint32_t mouseYAbs;
     45    /** Does the guest currently want the host pointer to be shown? */
     46    uint32_t fHostCursorRequested;
    4647
    4748    /** Pointer to device instance. */
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