VirtualBox

Changeset 8323 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 23, 2008 10:11:19 AM (17 years ago)
Author:
vboxsync
Message:

Frontends/VirtualBox3/4, Main: only switch to seamless mode if the host resolution is less than the maximum currently supported by the additions

Location:
trunk/src/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r8322 r8323  
    19711971                         * screen.height() /* display height */
    19721972                         * QColor::numBitPlanes(); /* bit per pixel */
    1973         if (aOn && (availBits < usedBits))
     1973        CGuest guest = console->console().GetGuest();
     1974        ULONG maxWidth  = guest.GetMaxGuestWidth();
     1975        ULONG maxHeight = guest.GetMaxGuestHeight();
     1976        if (aOn && (   (availBits < usedBits)
     1977                    || ((maxWidth != 0) && (maxWidth < screen.width()))
     1978                    || ((maxHeight != 0) && (maxHeight < screen.height()))
     1979                   )
     1980           )
    19741981        {
    19751982            vboxProblem().cannotEnterSeamlessMode (screen.width(),
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r8322 r8323  
    19941994                         * screen.height() /* display height */
    19951995                         * depth(); /* bit per pixel */
    1996         if (aOn && (availBits < usedBits))
     1996        CGuest guest = console->console().GetGuest();
     1997        ULONG maxWidth  = guest.GetMaxGuestWidth();
     1998        ULONG maxHeight = guest.GetMaxGuestHeight();
     1999        if (aOn && (   (availBits < usedBits)
     2000                    || ((maxWidth != 0) && (maxWidth < screen.width()))
     2001                    || ((maxHeight != 0) && (maxHeight < screen.height()))
     2002                   )
     2003           )
    19972004        {
    19982005            vboxProblem().cannotEnterSeamlessMode (screen.width(),
  • trunk/src/VBox/Main/GuestImpl.cpp

    r8312 r8323  
    161161}
    162162
     163STDMETHODIMP 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
     178STDMETHODIMP 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
    163193STDMETHODIMP Guest::COMGETTER(SupportsSeamless) (BOOL *aSupportsSeamless)
    164194{
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r8155 r8323  
    51845184  <interface
    51855185     name="IGuest" extends="$unknown"
    5186      uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
     5186     uuid="655f0f7f-a35b-4e2f-a728-175d7e18dcce"
    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.
    52295247      </desc>
    52305248    </attribute>
  • trunk/src/VBox/Main/include/GuestImpl.h

    r8312 r8323  
    6161    STDMETHOD(COMGETTER(AdditionsActive)) (BOOL *aAdditionsActive);
    6262    STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion);
     63    STDMETHOD(COMGETTER(MaxGuestWidth)) (ULONG *aMaxWidth);
     64    STDMETHOD(COMGETTER(MaxGuestHeight)) (ULONG *aMaxHeight);
    6365    STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless);
    6466    STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics);
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