VirtualBox

Changeset 7453 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 14, 2008 9:53:08 AM (17 years ago)
Author:
vboxsync
Message:

Frontends/VirtualBox4: ported r28888: the saved guest resolution and initial size hint should take guest-initiated resolution changes into account as long as the additions are managing graphics in the guest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r7435 r7453  
    10871087                if (mMainWnd->isTrueFullscreen() || mMainWnd->isTrueSeamless())
    10881088                    updateGeometry();
     1089
     1090                /* Remember the new size for sending an initial size hint
     1091                   on next power up. */
     1092                if (mConsole.GetGuest().GetSupportsGraphics())
     1093                    mLastSizeHint = QSize(re->width(), re->height());
    10891094
    10901095                /* make sure that all posted signals are processed */
     
    35793584
    35803585        mConsole.GetDisplay().SetVideoModeHint (sz.width(), sz.height(), 0, 0);
    3581         mLastSizeHint = sz;
    35823586    }
    35833587}
     
    36003604    if (!ok || w > screen.width() || h > screen.height())
    36013605    {
    3602         enum { NUM_RES = 4 };
    3603         const int sizeList[NUM_RES][2] =
     3606        static const int sizeList[][2] =
    36043607        {
    36053608            { 640, 480 },
     
    36123615        /* Find a size that is smaller than three quarters of the reported
    36133616           screen geometry. */
    3614         while (   (i + 1 < NUM_RES)
    3615                && (sizeList[i + 1][0] < screen.width() * 3 / 4)
    3616                && (sizeList[i + 1][1] < screen.height() * 3 / 4))
     3617        while (   i + 1 < RT_ELEMENTS (sizeList)
     3618               && sizeList[i + 1][0] < screen.width() * 3 / 4
     3619               && sizeList[i + 1][1] < screen.height() * 3 / 4)
    36173620            ++i;
    36183621        w = sizeList[i][0];
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