VirtualBox

Changeset 38957 in vbox for trunk/src


Ignore:
Timestamp:
Oct 6, 2011 12:49:05 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74328
Message:

FE/Qt: remove should-we-resize heuristics which are no longer needed

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
5 edited

Legend:

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

    r38949 r38957  
    158158    AssertMsg(newSize.isValid(), ("Size should be valid!\n"));
    159159
    160     /* Do not send the same hints as we already have: */
    161     if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height()))
    162         return;
    163 
    164     /* We only actually send the hint if either an explicit new size was given
    165      * (e.g. if the request was triggered directly by a console resize event) or
    166      * if no explicit size was specified but a resize is flagged as being needed
    167      * (e.g. the autoresize was just enabled and the console was resized while it was disabled). */
    168     if (toSize.isValid() || m_fShouldWeDoResize)
    169     {
    170         /* Remember the new size: */
    171         storeConsoleSize(newSize.width(), newSize.height());
    172 
    173         /* Send new size-hint to the guest: */
    174         session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
    175     }
    176 
    177     /* We had requested resize now, rejecting other accident requests: */
    178     m_fShouldWeDoResize = false;
     160    /* Remember the new size: */
     161    storeConsoleSize(newSize.width(), newSize.height());
     162
     163    /* Send new size-hint to the guest: */
     164    session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
    179165}
    180166
     
    248234    , m_previousState(KMachineState_Null)
    249235    , m_desktopGeometryType(DesktopGeo_Invalid)
    250     , m_fShouldWeDoResize(false)
    251236#ifdef VBOX_WITH_VIDEOHWACCEL
    252237    , m_fAccelerate2DVideo(bAccelerate2DVideo)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r38949 r38957  
    177177    QSize m_storedConsoleSize;
    178178
    179     bool m_fShouldWeDoResize : 1;
    180179#ifdef VBOX_WITH_VIDEOHWACCEL
    181180    bool m_fAccelerate2DVideo : 1;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r38949 r38957  
    187187                    break;
    188188
    189                 /* Set the "guest needs to resize" hint.
    190                  * This hint is acted upon when (and only when) the autoresize property is "true": */
    191                 m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics();
    192                 if (m_bIsGuestAutoresizeEnabled && m_fShouldWeDoResize)
     189                if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
    193190                    QTimer::singleShot(0, this, SLOT(sltPerformGuestResize()));
    194191                break;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r38949 r38957  
    174174            case QEvent::Resize:
    175175            {
    176                 /* Set the "guest needs to resize" hint.
    177                  * This hint is acted upon when (and only when) the autoresize property is "true": */
    178                 m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics();
    179176                if (pEvent->spontaneous() && m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
    180177                    QTimer::singleShot(300, this, SLOT(sltPerformGuestResize()));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp

    r38949 r38957  
    195195                    break;
    196196
    197                 /* Set the "guest needs to resize" hint. */
    198                 m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics();
    199                 if (m_fShouldWeDoResize)
     197                if (uisession()->isGuestSupportsGraphics())
    200198                    QTimer::singleShot(0, this, SLOT(sltPerformGuestResize()));
    201199                break;
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