VirtualBox

Changeset 77667 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 12, 2019 4:03:53 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: try to avoid saving size hints for guest-initiated resizes.
bugref:9399: FE/Qt: GUI sends size hint for guest-initiated resize.
When the guest resizes this triggers the GUIs window resize code. To avoid
sending unneeded size hints we check whether the guest screen size already
matches the new window size, the logic being that in that case it was
probably the guest screen resize which triggered the host window resize, and
if it does we do not send a size hint. In that case though we should also
not remember the size hint for the next time we start the guest.

File:
1 edited

Legend:

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

    r77164 r77667  
    297297    /* Record the hint to extra data, needed for guests using VMSVGA: */
    298298    /* This should be done before the actual hint is sent in case the guest overrides it. */
     299    /* Do not send a hint if nothing has changed to prevent the guest being notified about its own changes. */
    299300    if (   !isFullscreenOrSeamless()
    300         && uisession()->isGuestSupportsGraphics())
     301        && uisession()->isGuestSupportsGraphics()
     302        && (   (int)m_pFrameBuffer->width() != size.width()
     303            || (int)m_pFrameBuffer->height() != size.height()
     304            || uisession()->isScreenVisible(screenId()) != uisession()->isScreenVisibleHostDesires(screenId())))
    301305        storeGuestSizeHint(size);
    302306
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