VirtualBox

Changeset 76164 in vbox


Ignore:
Timestamp:
Dec 11, 2018 4:14:25 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: for guests using VMSVGA, do not remember guest-initiated resizes.
bugref:5329: Implement VMWare SVGA compatible video device
Currently we remember the last size set by the guest operating system to the
virtual display hardware before it was shut down and resend it on next start-
up. This is similar to having the same monitor plugged into a physical
system next time it is started. However, Linux guests using VMSVGA always
set the size to 800x600 with one screen on shut-down, which is not what we
want to remember. So for guests with the VMSVGA graphics controller type
(normally only used for Linux guests) we only remember sizes which we
explicitly send ourselves, as of this change, to get around this.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r75642 r76164  
    37093709{
    37103710    /* Not for primary screen: */
    3711     AssertReturn(uScreenIndex > 0, true);
     3711    if (uScreenIndex == 0)
     3712        return true;
    37123713
    37133714    /* Compose corresponding key: */
     
    37213722{
    37223723    /* Not for primary screen: */
    3723     AssertReturnVoid(uScreenIndex > 0);
     3724    if (uScreenIndex == 0)
     3725        return;
    37243726
    37253727    /* Compose corresponding key: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r76062 r76164  
    319319            (int)screenId(), size.width(), size.height()));
    320320
     321    /* Record the hint to extra data, needed for guests using VMSVGA: */
     322    storeGuestSizeHint(size);
     323
    321324    /* If auto-mount of guest-screens (auto-pilot) enabled: */
    322325    if (gEDataManager->autoMountGuestScreensEnabled(vboxGlobal().managedVMUuid()))
     
    434437    /* If we are in normal or scaled mode and if GA are active,
    435438     * remember the guest-screen size to be able to restore it when necessary: */
    436     if (!isFullscreenOrSeamless() && uisession()->isGuestSupportsGraphics())
     439    /* As machines with Linux/Solaris and VMSVGA are not able to tell us
     440     * whether a resize was due to the system or user interaction we currently
     441     * do not store hints for these systems except when we explicitly send them
     442     * ourselves.  Windows guests should use VBoxVGA controllers, not VMSVGA. */
     443    if (   !isFullscreenOrSeamless()
     444        && uisession()->isGuestSupportsGraphics()
     445        && (machine().GetGraphicsControllerType() != KGraphicsControllerType_VMSVGA))
    437446        storeGuestSizeHint(QSize(iWidth, iHeight));
    438447
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r75361 r76164  
    20612061    /* Remember 'actual' (host-desire) visibility status: */
    20622062    m_monitorVisibilityVectorHostDesires[(int)uScreenId] = fIsMonitorVisible;
     2063
     2064    /* And remember the request in extra data for guests with VMSVGA: */
     2065    gEDataManager->setLastGuestScreenVisibilityStatus(uScreenId, fIsMonitorVisible, vboxGlobal().managedVMUuid());
    20632066}
    20642067
     
    20802083    m_monitorVisibilityVector[(int)uScreenId] = fIsMonitorVisible;
    20812084    /* Remember 'desired' visibility status: */
    2082     gEDataManager->setLastGuestScreenVisibilityStatus(uScreenId, fIsMonitorVisible, vboxGlobal().managedVMUuid());
     2085    /* See note in UIMachineView::sltHandleNotifyChange() regarding the graphics controller check. */
     2086    if (machine().GetGraphicsControllerType() != KGraphicsControllerType_VMSVGA)
     2087        gEDataManager->setLastGuestScreenVisibilityStatus(uScreenId, fIsMonitorVisible, vboxGlobal().managedVMUuid());
    20832088
    20842089    /* Make sure action-pool knows guest-screen visibility status: */
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