VirtualBox

Changeset 9048 in vbox for trunk


Ignore:
Timestamp:
May 22, 2008 6:16:10 AM (17 years ago)
Author:
vboxsync
Message:

Frontends/VirtualBox and VirtualBox4: whether or not the console view object should perform resize operations should depend on the state of the guest SUPPORTS_GRAPHICS capability, not on whether or not the Additions are present

Location:
trunk/src/VBox/Frontends
Files:
4 edited

Legend:

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

    r9036 r9048  
    240240    bool mAutoresizeGuest : 1;
    241241
    242     bool mIsAdditionsActive : 1;
     242    bool mGuestSupportsGraphics : 1;
    243243
    244244    bool mNumLock : 1;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r9045 r9048  
    629629    , mIgnoreMainwndResize (true)
    630630    , mAutoresizeGuest (false)
    631     , mIsAdditionsActive (false)
     631    , mGuestSupportsGraphics (false)
    632632    , mNumLock (false)
    633633    , mScrollLock (false)
     
    997997        maybeRestrictMinimumSize();
    998998
    999         if (mIsAdditionsActive && mAutoresizeGuest)
     999        if (mGuestSupportsGraphics && mAutoresizeGuest)
    10001000            doResizeHint();
    10011001    }
     
    12001200                LogFlowFunc (("AdditionsStateChangeEventType\n"));
    12011201
    1202                 mIsAdditionsActive = ge->additionActive();
     1202                mGuestSupportsGraphics = ge->supportsGraphics();
    12031203
    12041204                maybeRestrictMinimumSize();
     
    15551555            {
    15561556                if (!mIgnoreMainwndResize &&
    1557                     mIsAdditionsActive && mAutoresizeGuest)
     1557                    mGuestSupportsGraphics && mAutoresizeGuest)
    15581558                    resize_hint_timer->start (300, TRUE);
    15591559                break;
     
    22442244void VBoxConsoleView::toggleFSMode (const QSize &aSize)
    22452245{
    2246     if ((mIsAdditionsActive && mAutoresizeGuest) ||
     2246    if ((mGuestSupportsGraphics && mAutoresizeGuest) ||
    22472247        mMainWnd->isTrueFullscreen())
    22482248    {
     
    22862286bool VBoxConsoleView::isAutoresizeGuestActive()
    22872287{
    2288     return mIsAdditionsActive && mAutoresizeGuest;
     2288    return mGuestSupportsGraphics && mAutoresizeGuest;
    22892289}
    22902290
     
    35453545void VBoxConsoleView::doResizeHint (const QSize &aToSize)
    35463546{
    3547     if ((mIsAdditionsActive && mAutoresizeGuest) ||
     3547    if ((mGuestSupportsGraphics && mAutoresizeGuest) ||
    35483548        mMainWnd->isTrueFullscreen())
    35493549    {
     
    36543654    if (mode == VBoxDefs::SDLMode)
    36553655    {
    3656         if (!mIsAdditionsActive || !mAutoresizeGuest)
     3656        if (!mGuestSupportsGraphics || !mAutoresizeGuest)
    36573657            setMinimumSize (sizeHint());
    36583658        else
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h

    r8909 r9048  
    258258    bool mAutoresizeGuest : 1;
    259259
    260     bool mIsAdditionsActive : 1;
     260    bool mGuestSupportsGraphics : 1;
    261261
    262262    bool mNumLock : 1;
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r8909 r9048  
    650650    , mIgnoreMainwndResize (true)
    651651    , mAutoresizeGuest (false)
    652     , mIsAdditionsActive (false)
     652    , mGuestSupportsGraphics (false)
    653653    , mNumLock (false)
    654654    , mScrollLock (false)
     
    10321032        maybeRestrictMinimumSize();
    10331033
    1034         if (mIsAdditionsActive && mAutoresizeGuest)
     1034        if (mGuestSupportsGraphics && mAutoresizeGuest)
    10351035            doResizeHint();
    10361036    }
     
    12481248                LogFlowFunc (("AdditionsStateChangeEventType\n"));
    12491249
    1250                 mIsAdditionsActive = ge->additionActive();
     1250                mGuestSupportsGraphics = ge->supportsGraphics();
    12511251
    12521252                maybeRestrictMinimumSize();
     
    16021602            {
    16031603                if (!mIgnoreMainwndResize &&
    1604                     mIsAdditionsActive && mAutoresizeGuest)
     1604                    mGuestSupportsGraphics && mAutoresizeGuest)
    16051605                    QTimer::singleShot (300, this, SLOT (doResizeHint()));
    16061606                break;
     
    22842284void VBoxConsoleView::toggleFSMode()
    22852285{
    2286     if ((mIsAdditionsActive && mAutoresizeGuest) ||
     2286    if ((mGuestSupportsGraphics && mAutoresizeGuest) ||
    22872287        mMainWnd->isTrueFullscreen())
    22882288    {
     
    23032303     * feature disabled". 100 msec pause required for resizing
    23042304     * before normalizing geometry. */
    2305     mToggleFSModeTimer->start (mIsAdditionsActive && mAutoresizeGuest ?
     2305    mToggleFSModeTimer->start (mGuestSupportsGraphics && mAutoresizeGuest ?
    23062306        2000 : 100);
    23072307
     
    23372337bool VBoxConsoleView::isAutoresizeGuestActive()
    23382338{
    2339     return mIsAdditionsActive && mAutoresizeGuest;
     2339    return mGuestSupportsGraphics && mAutoresizeGuest;
    23402340}
    23412341
     
    35743574void VBoxConsoleView::doResizeHint (const QSize &aToSize)
    35753575{
    3576     if ((mIsAdditionsActive && mAutoresizeGuest) ||
     3576    if ((mGuestSupportsGraphics && mAutoresizeGuest) ||
    35773577        mMainWnd->isTrueFullscreen())
    35783578    {
     
    36833683    if (mode == VBoxDefs::SDLMode)
    36843684    {
    3685         if (!mIsAdditionsActive || !mAutoresizeGuest)
     3685        if (!mGuestSupportsGraphics || !mAutoresizeGuest)
    36863686            setMinimumSize (sizeHint());
    36873687        else
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