VirtualBox

Changeset 8425 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 28, 2008 3:03:37 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30274
Message:

Frontends/VirtualBox3/4, Main, Devices/VMMDev, Frontends/VBoxBFE, Additions/common, Additions/x11: reverted r30152, r30085, r30074 and r30072

Location:
trunk/src/VBox
Files:
12 edited

Legend:

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

    r8398 r8425  
    232232    return fRc;
    233233}
    234 
    235 
    236 /**
    237  * Report the maximum resolution that we currently support to the host.
    238  *
    239  * @returns iprt status value.
    240  * @param   cx      The maximum horizontal resolution.
    241  * @param   cy      The maximum vertical resolution.
    242  */
    243 VBGLR3DECL(int) VbglR3ReportMaxGuestResolution(uint32_t cx, uint32_t cy)
    244 {
    245     int rc = VERR_UNRESOLVED_ERROR;
    246     VMMDevReqGuestResolution req;
    247 
    248     vmmdevInitRequest(&req.header, VMMDevReq_SetMaxGuestResolution);
    249     req.u32MaxWidth     = cx;
    250     req.u32MaxHeight    = cy;
    251     rc = vbglR3GRPerform(&req.header);
    252     if (!RT_SUCCESS(rc) || !RT_SUCCESS(req.header.rc))
    253         LogRelFunc(("error reporting maximum supported resolution to VMMDev. "
    254                     "rc = %Vrc, VMMDev rc = %Vrc\n", rc, req.header.rc));
    255     if (RT_SUCCESS(rc))
    256         rc = req.header.rc;
    257     return rc;
    258 }
  • trunk/src/VBox/Additions/x11/xgraphics/vboxutils.c

    r8366 r8425  
    901901    return VbglR3HostLikesVideoMode(cx, cy, cBits);
    902902}
    903 
    904 
    905 /**
    906  * Report the maximum resolution supported by the guest
    907  *
    908  * @returns true for success, false otherwise
    909  * @param   u32Width   maximum horizontal resolution supported
    910  * @param   u32Height  maximum vertical resolution supported
    911  */
    912 Bool
    913 vboxReportMaxGuestResolution(uint32_t u32Width, uint32_t u32Height)
    914 {
    915     int irc = VbglR3ReportMaxGuestResolution(u32Width, u32Height);
    916     return RT_SUCCESS(irc);
    917 }
  • trunk/src/VBox/Additions/x11/xgraphics/vboxvideo.h

    r8366 r8425  
    176176
    177177extern Bool vboxHostLikesVideoMode(uint32_t cx, uint32_t cy, uint32_t cBits);
    178 extern Bool vboxReportMaxGuestResolution(uint32_t u32Width, uint32_t u32Height);
    179178
    180179#endif /* _VBOXVIDEO_H_ */
  • trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp

    r8325 r8425  
    572572
    573573                pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps);
    574                 pRequestHeader->rc = VINF_SUCCESS;
    575             }
    576             break;
    577         }
    578 
    579         case VMMDevReq_SetMaxGuestResolution:
    580         {
    581             if (pRequestHeader->size != sizeof(VMMDevReqGuestResolution))
    582             {
    583                 AssertMsgFailed(("VMMDev guest resolution structure has invalid size!\n"));
    584                 pRequestHeader->rc = VERR_INVALID_PARAMETER;
    585             }
    586             else
    587             {
    588                 VMMDevReqGuestResolution *guestRes = (VMMDevReqGuestResolution*)pRequestHeader;
    589 
    590                 pData->u32MaxGuestWidth  = guestRes->u32MaxWidth;
    591                 pData->u32MaxGuestHeight = guestRes->u32MaxHeight;
    592 
    593                 LogRel(("Guest Additions maximum resolution of %dx%d reported\n",
    594                         pData->u32MaxGuestWidth, pData->u32MaxGuestHeight));
    595 
    596                 /* Only notify frontends that are interested (i.e. Main, but not BFE) */
    597                 if (NULL != pData->pDrv->pfnUpdateMaxGuestResolution)
    598                     pData->pDrv->pfnUpdateMaxGuestResolution(pData->pDrv, pData->u32MaxGuestWidth, pData->u32MaxGuestHeight);
    599574                pRequestHeader->rc = VINF_SUCCESS;
    600575            }
     
    19721947
    19731948
    1974 #define VMMDEV_SSM_VERSION  7
     1949#define VMMDEV_SSM_VERSION  6
    19751950
    19761951/**
     
    20031978    SSMR3PutU32(pSSMHandle, pData->guestCaps);
    20041979
    2005     SSMR3PutU32(pSSMHandle, pData->u32MaxGuestWidth);
    2006     SSMR3PutU32(pSSMHandle, pData->u32MaxGuestHeight);
    2007 
    20081980#ifdef VBOX_HGCM
    20091981    vmmdevHGCMSaveState (pData, pSSMHandle);
     
    20241996{
    20251997    VMMDevState *pData = PDMINS2DATA(pDevIns, VMMDevState*);
    2026     if (   SSM_VERSION_MAJOR_CHANGED(u32Version, VMMDEV_SSM_VERSION)
    2027         || (SSM_VERSION_MINOR(u32Version) < 6))
     1998    if (u32Version != VMMDEV_SSM_VERSION)
    20281999        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
    20292000    SSMR3GetU32(pSSMHandle, &pData->hypervisorSize);
     
    20462017    SSMR3GetU32(pSSMHandle, &pData->guestCaps);
    20472018
    2048     if (   SSM_VERSION_MAJOR(u32Version) >  0
    2049         || SSM_VERSION_MINOR(u32Version) >= 7)
    2050     {
    2051         SSMR3GetU32(pSSMHandle, &pData->u32MaxGuestWidth);
    2052         SSMR3GetU32(pSSMHandle, &pData->u32MaxGuestHeight);
    2053     }
    2054 
    20552019#ifdef VBOX_HGCM
    20562020    vmmdevHGCMLoadState (pData, pSSMHandle);
     
    20822046    if (pData->pDrv)
    20832047        pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps);
    2084 
    2085     if (    pData->pDrv && pData->pDrv->pfnUpdateMaxGuestResolution)
    2086         pData->pDrv->pfnUpdateMaxGuestResolution(pData->pDrv, pData->u32MaxGuestWidth, pData->u32MaxGuestHeight);
    20872048
    20882049    return VINF_SUCCESS;
     
    23582319    pData->fu32AdditionsOk = false;
    23592320    memset (&pData->guestInfo, 0, sizeof (pData->guestInfo));
    2360 
    2361     /* No maximum resolution specified yet */
    2362     pData->u32MaxGuestWidth  = 0;
    2363     pData->u32MaxGuestHeight = 0;
    23642321
    23652322    memset (&pData->lastReadDisplayChangeRequest, 0, sizeof (pData->lastReadDisplayChangeRequest));
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r8312 r8425  
    108108    uint32_t u32VideoAccelEnabled;
    109109
    110     /** Maximum guest resolution, width - a value of 0 mean no maximum */
    111     uint32_t u32MaxGuestWidth;
    112     /** Maximum guest resolution, height - a value of 0 mean no maximum */
    113     uint32_t u32MaxGuestHeight;
    114 
    115110    /** resolution change request */
    116111    struct
  • trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp

    r8312 r8425  
    421421    pData->Connector.pfnUpdateGuestVersion      = VMMDev::UpdateGuestVersion;
    422422    pData->Connector.pfnUpdateGuestCapabilities = VMMDev::UpdateGuestCapabilities;
    423     pData->Connector.pfnUpdateMaxGuestResolution = NULL;
    424423    pData->Connector.pfnUpdateMouseCapabilities = VMMDev::UpdateMouseCapabilities;
    425424    pData->Connector.pfnUpdatePointerShape      = VMMDev::UpdatePointerShape;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r8385 r8425  
    19711971                         * csession.GetMachine().GetMonitorCount() /**< @todo fix assumption that all screens have same resolution */
    19721972                         + 4096 * 8; /* adapter info */
    1973         CGuest guest = console->console().GetGuest();
    1974         LONG maxWidth  = guest.GetMaxGuestWidth();
    1975         LONG maxHeight = guest.GetMaxGuestHeight();
    1976         /** @todo this implements the correct size computation for X11 guests.
    1977          * Using a less wasteful approach than using a square region would be
    1978          * appreciated, but this has to reflect what the guest additions do. */
    1979         if (maxWidth || maxHeight)
    1980             usedBits = RT_MAX(usedBits, (  RT_MAX(screen.width(), screen.height())
    1981                                          * RT_MAX(screen.width(), screen.height())
    1982                                          * guestBpp
    1983                                          + _1M * 8) /* current cache per screen - may be changed in future */
    1984                                         * csession.GetMachine().GetMonitorCount() /**< @todo fix assumption that all screens have same resolution */
    1985                                         + 4096 * 8); /* adapter info */
    1986 
    1987         if (aOn && (   (availBits < usedBits)
    1988                     || ((maxWidth != 0) && (maxWidth < screen.width()))
    1989                     || ((maxHeight != 0) && (maxHeight < screen.height()))
    1990                    )
    1991            )
     1973
     1974        if (aOn && (availBits < usedBits))
    19921975        {
    19931976            vboxProblem().cannotEnterSeamlessMode (screen.width(),
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r8363 r8425  
    19941994                         * csession.GetMachine().GetMonitorCount() /**< @todo fix assumption that all screens have same resolution */
    19951995                         + 4096 * 8; /* adapter info */
    1996         CGuest guest = console->console().GetGuest();
    1997         LONG maxWidth  = guest.GetMaxGuestWidth();
    1998         LONG maxHeight = guest.GetMaxGuestHeight();
    1999         if (aOn && (   (availBits < usedBits)
    2000                     || ((maxWidth != 0) && (maxWidth < screen.width()))
    2001                     || ((maxHeight != 0) && (maxHeight < screen.height()))
    2002                    )
    2003            )
     1996        if (aOn && (availBits < usedBits))
    20041997        {
    20051998            vboxProblem().cannotEnterSeamlessMode (screen.width(),
  • trunk/src/VBox/Main/GuestImpl.cpp

    r8350 r8425  
    161161}
    162162
    163 STDMETHODIMP Guest::COMGETTER(MaxGuestWidth) (ULONG *aMaxWidth)
    164 {
    165     if (!VALID_PTR(aMaxWidth))
    166         return E_POINTER;
    167 
    168     AutoCaller autoCaller (this);
    169     CheckComRCReturnRC (autoCaller.rc());
    170 
    171     AutoReadLock alock (this);
    172 
    173     *aMaxWidth = mData.mMaxWidth;
    174 
    175     return S_OK;
    176 }
    177 
    178 STDMETHODIMP Guest::COMGETTER(MaxGuestHeight) (ULONG *aMaxHeight)
    179 {
    180     if (!VALID_PTR(aMaxHeight))
    181         return E_POINTER;
    182 
    183     AutoCaller autoCaller (this);
    184     CheckComRCReturnRC (autoCaller.rc());
    185 
    186     AutoReadLock alock (this);
    187 
    188     *aMaxHeight = mData.mMaxHeight;
    189 
    190     return S_OK;
    191 }
    192 
    193163STDMETHODIMP Guest::COMGETTER(SupportsSeamless) (BOOL *aSupportsSeamless)
    194164{
     
    367337}
    368338
    369 void Guest::setMaxGuestResolution (ULONG aMaxWidth, ULONG aMaxHeight)
     339void Guest::setSupportsSeamless (BOOL aSupportsSeamless)
    370340{
    371341    AutoCaller autoCaller (this);
     
    374344    AutoWriteLock alock (this);
    375345
    376     mData.mMaxWidth  = aMaxWidth;
    377     mData.mMaxHeight = aMaxHeight;
    378 }
    379 
    380 void Guest::setSupportsSeamless (BOOL aSupportsSeamless)
     346    mData.mSupportsSeamless = aSupportsSeamless;
     347}
     348
     349void Guest::setSupportsGraphics (BOOL aSupportsGraphics)
    381350{
    382351    AutoCaller autoCaller (this);
     
    385354    AutoWriteLock alock (this);
    386355
    387     mData.mSupportsSeamless = aSupportsSeamless;
    388 }
    389 
    390 void Guest::setSupportsGraphics (BOOL aSupportsGraphics)
    391 {
    392     AutoCaller autoCaller (this);
    393     AssertComRCReturnVoid (autoCaller.rc());
    394 
    395     AutoWriteLock alock (this);
    396 
    397356    mData.mSupportsGraphics = aSupportsGraphics;
    398357}
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r8312 r8425  
    215215    pDrv->pVMMDev->getParent()->onAdditionsStateChange();
    216216   
    217 }
    218 
    219 /**
    220  * Update the maximum guest resolution.
    221  * This is called when the guest sends us a corresponding notification. The new resolution
    222  * is given and the connector should update its internal state.
    223  * @note    This member can be left null if the connector is not interested in the
    224  *          notification.
    225  *
    226  * @param   pInterface          Pointer to this interface.
    227  * @param   u32MaxWidth         New width.
    228  * @param   u32MaxHeight        New Height.
    229  * @thread  The emulation thread.
    230  */
    231 DECLCALLBACK(void) vmmdevUpdateMaxGuestResolution(PPDMIVMMDEVCONNECTOR pInterface, uint32_t u32MaxWidth, uint32_t u32MaxHeight)
    232 {
    233     PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface);
    234 
    235     /* store that information in IGuest */
    236     Guest* guest = pDrv->pVMMDev->getParent()->getGuest();
    237     Assert(guest);
    238     if (!guest)
    239         return;
    240 
    241     guest->setMaxGuestResolution(u32MaxWidth, u32MaxHeight);
    242 
    243     /* This information is queried when it is needed, so there is no need to
    244        issue any further notifications. */
    245217}
    246218
     
    705677    pData->Connector.pfnUpdateGuestVersion            = vmmdevUpdateGuestVersion;
    706678    pData->Connector.pfnUpdateGuestCapabilities       = vmmdevUpdateGuestCapabilities;
    707     pData->Connector.pfnUpdateMaxGuestResolution      = vmmdevUpdateMaxGuestResolution;
    708679    pData->Connector.pfnUpdateMouseCapabilities       = vmmdevUpdateMouseCapabilities;
    709680    pData->Connector.pfnUpdatePointerShape            = vmmdevUpdatePointerShape;
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r8367 r8425  
    51845184  <interface
    51855185     name="IGuest" extends="$unknown"
    5186      uuid="655f0f7f-a35b-4e2f-a728-175d7e18dcce"
     5186     uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
    51875187
    51885188     wsmap="suppress"
     
    52275227        the version might be refused by VirtualBox (incompatible) or
    52285228        other failures occured.
    5229       </desc>
    5230     </attribute>
    5231 
    5232     <attribute name="maxGuestWidth" type="unsigned long" readonly="yes">
    5233       <desc>
    5234         The maximum horizontal resolution currently supported by the
    5235         Guest Additions for the purpose of host-initiated resiing
    5236         (and fullscreen and seamless).  A value of zero means no
    5237         arbitrary maximum other than that imposed by VRAM limits.
    5238       </desc>
    5239     </attribute>
    5240 
    5241     <attribute name="maxGuestHeight" type="unsigned long" readonly="yes">
    5242       <desc>
    5243         The maximum vertical resolution currently supported by the
    5244         Guest Additions for the purpose of host-initiated resiing
    5245         (and fullscreen and seamless).  A value of zero means no
    5246         arbitrary maximum other than that imposed by VRAM limits.
    52475229      </desc>
    52485230    </attribute>
  • trunk/src/VBox/Main/include/GuestImpl.h

    r8323 r8425  
    6161    STDMETHOD(COMGETTER(AdditionsActive)) (BOOL *aAdditionsActive);
    6262    STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion);
    63     STDMETHOD(COMGETTER(MaxGuestWidth)) (ULONG *aMaxWidth);
    64     STDMETHOD(COMGETTER(MaxGuestHeight)) (ULONG *aMaxHeight);
    6563    STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless);
    6664    STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics);
     
    7876    void setAdditionsVersion (Bstr aVersion);
    7977
    80     void setMaxGuestResolution (ULONG aMaxWidth, ULONG aMaxHeight);
    81 
    8278    void setSupportsSeamless (BOOL aSupportsSeamless);
    8379
     
    9389    struct Data
    9490    {
    95         Data() : mAdditionsActive (FALSE), mMaxWidth (0),
    96                  mMaxHeight(0), mSupportsSeamless (FALSE),
     91        Data() : mAdditionsActive (FALSE), mSupportsSeamless (FALSE),
    9792                  /* Windows and OS/2 guests take this for granted */
    9893                 mSupportsGraphics (TRUE) {}
     
    10196        BOOL  mAdditionsActive;
    10297        Bstr  mAdditionsVersion;
    103         /** The maximum width supported by the guest - zero means no maximum */
    104         ULONG mMaxWidth;
    105         /** The maximum height supported by the guest - zero means no maximum */
    106         ULONG mMaxHeight;
    10798        BOOL  mSupportsSeamless;
    10899        BOOL  mSupportsGraphics;
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