VirtualBox

Changeset 76169 in vbox


Ignore:
Timestamp:
Dec 11, 2018 7:19:41 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: save size and visibility hints to extra data before not after sending.
bugref:5329: Implement VMWare SVGA compatible video device
Since the previous change we save size and visibility hints sent to the guest
in extra data. However, for non-VMSVGA guests we also save sizes and screen
visibility set by the guest. This change makes sure that we always save the
ones we send before the ones set by the guest, so that if the guest chooses
to adjust the mode we request we will save the guest choice, not our request.

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

Legend:

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

    r76164 r76169  
    320320
    321321    /* Record the hint to extra data, needed for guests using VMSVGA: */
     322    /* This should be done before the actual hint is sent in case the guest overrides it. */
    322323    storeGuestSizeHint(size);
    323324
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp

    r71615 r76169  
    134134            /* Then we have to disable excessive guest-screen: */
    135135            LogRel(("GUI: UIMultiScreenLayout::update: Disabling excessive guest-screen %d\n", iGuestScreen));
     136            m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, false);
    136137            m_pMachineLogic->display().SetVideoModeHint(iGuestScreen, false, false, 0, 0, 0, 0, 0);
    137             m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, false);
    138138        }
    139139    }
     
    168168            LogRel(("GUI: UIMultiScreenLayout::update: Enabling guest-screen %d with following resolution: %dx%d\n",
    169169                    iGuestScreen, uWidth, uHeight));
     170            m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, true);
    170171            m_pMachineLogic->display().SetVideoModeHint(iGuestScreen, true, false, 0, 0, uWidth, uHeight, 32);
    171             m_pMachineLogic->uisession()->setScreenVisibleHostDesires(iGuestScreen, true);
    172172        }
    173173    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r76164 r76169  
    20632063
    20642064    /* And remember the request in extra data for guests with VMSVGA: */
     2065    /* This should be done before the actual hint is sent in case the guest overrides it. */
    20652066    gEDataManager->setLastGuestScreenVisibilityStatus(uScreenId, fIsMonitorVisible, vboxGlobal().managedVMUuid());
    20662067}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r75358 r76169  
    230230    if (!fEnabled)
    231231    {
     232        uisession()->setScreenVisibleHostDesires(iIndex, false);
    232233        display().SetVideoModeHint(iIndex, false, false, 0, 0, 0, 0, 0);
    233         uisession()->setScreenVisibleHostDesires(iIndex, false);
    234234    }
    235235    else
     
    240240        if (!uHeight)
    241241            uHeight = 600;
     242        uisession()->setScreenVisibleHostDesires(iIndex, true);
    242243        display().SetVideoModeHint(iIndex, true, false, 0, 0, uWidth, uHeight, 32);
    243         uisession()->setScreenVisibleHostDesires(iIndex, true);
    244244    }
    245245}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r72458 r76169  
    175175    /// @todo What if not m_bIsGuestAutoresizeEnabled?
    176176    ///       Just let the guest start at the default 800x600?
     177    uisession()->setScreenVisibleHostDesires(screenId(), guestScreenVisibilityStatus());
    177178    display().SetVideoModeHint(screenId(),
    178179                               guestScreenVisibilityStatus(),
    179180                               false, 0, 0, sizeHint.width(), sizeHint.height(), 0);
    180     uisession()->setScreenVisibleHostDesires(screenId(), guestScreenVisibilityStatus());
    181181}
    182182
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp

    r71074 r76169  
    180180
    181181    /* Send saved size-hint to the guest: */
     182    uisession()->setScreenVisibleHostDesires(screenId(), guestScreenVisibilityStatus());
    182183    display().SetVideoModeHint(screenId(),
    183184                               guestScreenVisibilityStatus(),
    184185                               false, 0, 0, sizeHint.width(), sizeHint.height(), 0);
    185     uisession()->setScreenVisibleHostDesires(screenId(), guestScreenVisibilityStatus());
    186186}
    187187
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