VirtualBox

Changeset 91696 in vbox for trunk/src


Ignore:
Timestamp:
Oct 12, 2021 5:19:44 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Machine-view: Get rid of redundant size hints spammed as a part of guest auto-resize feature while previous hint still being handled.

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

Legend:

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

    r91363 r91696  
    348348    else
    349349    {
     350        /* Should we send a hint? */
     351        bool fSendHint = true;
    350352        /* Do not send a hint if nothing has changed to prevent the guest being notified about its own changes: */
    351         if ((int)frameBuffer()->width() != size.width() || (int)frameBuffer()->height() != size.height())
     353        if (fSendHint && (int)frameBuffer()->width() == size.width() && (int)frameBuffer()->height() == size.height())
     354            fSendHint = false;
     355        /* Do not send a hint if GA supports graphics and we have sent that hint already: */
     356        if (fSendHint && uisession()->isGuestSupportsGraphics() && m_lastSizeHint == size)
     357            fSendHint = false;
     358        if (fSendHint)
    352359        {
    353360            LogRel(("GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen %d as %dx%d\n",
     
    362369                                       0 /* bits per pixel */,
    363370                                       true /* notify? */);
     371            m_lastSizeHint = size;
    364372        }
    365373    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r90705 r91696  
    373373    QSize m_sizeHintOverride;
    374374
     375    /** Last size hint sent as a part of guest auto-resize feature.
     376      * @note Useful to avoid spamming CDisplay with same hint before
     377      *       frame-buffer finally resized to requested size. */
     378    QSize  m_lastSizeHint;
     379
    375380    /** Holds current host-screen number. */
    376381    int m_iHostScreenNumber;
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