VirtualBox

Changeset 9053 in vbox for trunk/src


Ignore:
Timestamp:
May 22, 2008 1:13:33 PM (17 years ago)
Author:
vboxsync
Message:

reverted r31118 and applied Michaels last patch (#2844#22) as a better solution

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

Legend:

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

    r9048 r9053  
    239239    bool mIgnoreMainwndResize : 1;
    240240    bool mAutoresizeGuest : 1;
     241    bool mDoResize : 1;
    241242
    242243    bool mGuestSupportsGraphics : 1;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r9048 r9053  
    629629    , mIgnoreMainwndResize (true)
    630630    , mAutoresizeGuest (false)
     631    , mDoResize (false)
    631632    , mGuestSupportsGraphics (false)
    632633    , mNumLock (false)
     
    15541555            case QEvent::Resize:
    15551556            {
     1557                /* Set the "guest needs to resize" hint.  This hint is acted upon
     1558                 * when (and only when) the autoresize property is set to "true". */
     1559                mDoResize = mGuestSupportsGraphics || mMainWnd->isTrueFullscreen();
    15561560                if (!mIgnoreMainwndResize &&
    15571561                    mGuestSupportsGraphics && mAutoresizeGuest)
     
    35453549void VBoxConsoleView::doResizeHint (const QSize &aToSize)
    35463550{
    3547     if ((mGuestSupportsGraphics && mAutoresizeGuest) ||
    3548         mMainWnd->isTrueFullscreen())
     3551    if (mGuestSupportsGraphics && mAutoresizeGuest)
    35493552    {
    35503553        /* If this slot is invoked directly then use the passed size
     
    35553558        if (!aToSize.isValid())
    35563559            sz -= QSize (frameWidth() * 2, frameWidth() * 2);
    3557         LogFlowFunc (("Will suggest %d x %d\n", sz.width(), sz.height()));
    3558 
    3559         /* Increase the desktop geometry if needed */
    3560         setDesktopGeoHint (sz.width(), sz.height());
    3561 
    3562         if (mAutoresizeGuest)
     3560        if (mAutoresizeGuest &&
     3561            (aToSize.isValid() || mDoResize))
     3562        {
     3563            LogFlowFunc (("Will suggest %d x %d\n", sz.width(), sz.height()));
     3564
     3565            /* Increase the desktop geometry if needed */
     3566            setDesktopGeoHint (sz.width(), sz.height());
     3567
    35633568            mConsole.GetDisplay().SetVideoModeHint (sz.width(), sz.height(), 0, 0);
     3569        }
    35643570    }
    35653571}
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r9050 r9053  
    32613261            toggleFullscreenMode (true, true);
    32623262        /* Disable auto-resizing if advanced graphics are not available */
    3263         /* See #2844#c10. This is just not necessary here and may lead to
    3264          * invalid video mode hints. */
    3265 #if 0
    32663263        console->setAutoresizeGuest (   mIsGraphicsSupported
    32673264                                     && vmAutoresizeGuestAction->isOn());
    3268 #endif
    32693265        vmAutoresizeGuestAction->setEnabled (mIsGraphicsSupported);
    32703266    }
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h

    r9048 r9053  
    257257    bool mIgnoreMainwndResize : 1;
    258258    bool mAutoresizeGuest : 1;
     259    bool mDoResize : 1;
    259260
    260261    bool mGuestSupportsGraphics : 1;
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r9048 r9053  
    650650    , mIgnoreMainwndResize (true)
    651651    , mAutoresizeGuest (false)
     652    , mDoResize (false)
    652653    , mGuestSupportsGraphics (false)
    653654    , mNumLock (false)
     
    16011602            case QEvent::Resize:
    16021603            {
     1604                /* Set the "guest needs to resize" hint.  This hint is acted upon
     1605                 * when (and only when) the autoresize property is set to "true". */
     1606                mDoResize = mGuestSupportsGraphics || mMainWnd->isTrueFullscreen();
    16031607                if (!mIgnoreMainwndResize &&
    16041608                    mGuestSupportsGraphics && mAutoresizeGuest)
     
    35743578void VBoxConsoleView::doResizeHint (const QSize &aToSize)
    35753579{
    3576     if ((mGuestSupportsGraphics && mAutoresizeGuest) ||
    3577         mMainWnd->isTrueFullscreen())
     3580    if (mGuestSupportsGraphics && mAutoresizeGuest)
    35783581    {
    35793582        /* If this slot is invoked directly then use the passed size
     
    35843587        if (!aToSize.isValid())
    35853588            sz -= QSize (frameWidth() * 2, frameWidth() * 2);
    3586         LogFlowFunc (("Will suggest %d x %d\n", sz.width(), sz.height()));
    3587 
    3588         /* Increase the desktop geometry if needed */
    3589         setDesktopGeoHint (sz.width(), sz.height());
    3590 
    3591         if (mAutoresizeGuest)
     3589        if (mAutoresizeGuest &&
     3590            (aToSize.isValid() || mDoResize))
     3591        {
     3592            LogFlowFunc (("Will suggest %d x %d\n", sz.width(), sz.height()));
     3593
     3594            /* Increase the desktop geometry if needed */
     3595            setDesktopGeoHint (sz.width(), sz.height());
     3596
    35923597            mConsole.GetDisplay().SetVideoModeHint (sz.width(), sz.height(), 0, 0);
     3598        }
    35933599    }
    35943600}
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r9028 r9053  
    33233323            toggleFullscreenMode (true, true);
    33243324        /* Disable auto-resizing if advanced graphics are not available */
    3325         /* See #2844#c10. This is just not necessary here and may lead to
    3326          * invalid video mode hints. */
    3327 #if 0
    33283325        console->setAutoresizeGuest (   mIsGraphicsSupported
    33293326                                     && vmAutoresizeGuestAction->isChecked());
    3330 #endif
    33313327        vmAutoresizeGuestAction->setEnabled (mIsGraphicsSupported);
    33323328    }
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