VirtualBox

Changeset 4090 in vbox


Ignore:
Timestamp:
Aug 8, 2007 10:33:39 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
23538
Message:

2079: Create seamless mode for Windows guests:

Warn user about he is unable to enter the seamless mode if the guest's Video RAM is not large enough to support a resize to full screen on the host.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h

    r4071 r4090  
    129129    void cannotFindMachineByName (const CVirtualBox &vbox, const QString &name);
    130130
     131    void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight,
     132                                  ULONG aBpp, ULONG aVRam);
     133
    131134    bool confirmMachineDeletion (const CMachine &machine);
    132135    bool confirmDiscardSavedState (const CMachine &machine);
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r4071 r4090  
    17981798        return;
    17991799
     1800    /* Check if the Guest Video RAM enough for the seamless mode */
     1801    QRect screen = QApplication::desktop()->screenGeometry (this);
     1802    ULONG vRamSize = csession.GetMachine().GetVRAMSize();
     1803    if (aSeamless && aOn &&
     1804        (ULONG64) vRamSize * _1M * 8 <
     1805        (ULONG64) screen.width() * screen.height() * QColor::numBitPlanes())
     1806    {
     1807        vboxProblem().cannotEnterSeamlessMode (screen.width(),
     1808            screen.height(), QColor::numBitPlanes(), vRamSize);
     1809        vmSeamlessAction->setOn (false);
     1810        return;
     1811    }
     1812
    18001813    AssertReturnVoid (console);
    18011814    AssertReturnVoid ((hidden_children.isEmpty() == aOn));
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp

    r4087 r4090  
    841841}
    842842
     843void VBoxProblemReporter::cannotEnterSeamlessMode (ULONG aWidth,
     844                                                   ULONG aHeight,
     845                                                   ULONG aBpp, ULONG aVRam)
     846{
     847    message (&vboxGlobal().consoleWnd(), Error,
     848             tr ("<p>Could not enter seamless in <b><nobr>%1x%2x"
     849                 "%3 bpp</nobr></b> mode due to lack of Guest OS Video memory. "
     850                 "You should have at least <b>%4</b> of Video Memory to enter "
     851                 "the Seamless Mode with such desktop parameters but "
     852                 "currently you have only <b>%5</b> available.</p>"
     853                 "<p>Increase the amount of Guest OS Video Memory "
     854                 "with using of Machine Settings Dialog to overcome "
     855                 "this prohibition.</p>")
     856             .arg (aWidth).arg (aHeight).arg (aBpp)
     857             .arg (VBoxGlobal::formatSize ((ULONG64) aWidth*aHeight*aBpp/8))
     858             .arg (VBoxGlobal::formatSize ((ULONG64) aVRam*_1M))
     859    );
     860}
     861
    843862bool VBoxProblemReporter::confirmMachineDeletion (const CMachine &machine)
    844863{
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