VirtualBox

Changeset 49306 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 28, 2013 12:46:49 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90268
Message:

FE/Qt: Runtime UI: Make sure automatically enabled guest screen receive proper size hint as soon as possible (even if it have valid size already it can have pending invalid hint).

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

Legend:

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

    r49262 r49306  
    4545    , m_width(0), m_height(0)
    4646    , m_fIsMarkedAsUnused(false)
     47    , m_fIsAutoEnabled(false)
    4748#ifdef Q_OS_WIN
    4849    , m_iRefCnt(0)
     
    8283    m_fIsMarkedAsUnused = fIsMarkAsUnused;
    8384    unlock();
     85}
     86
     87/**
     88 * Returns the framebuffer <b>auto-enabled</b> status.
     89 * @returns @c true if guest-screen corresponding to this framebuffer was automatically enabled by
     90            the auto-mount guest-screen auto-pilot, @c false otherwise.
     91 * @note    <i>Auto-enabled</i> status means the framebuffer was automatically enabled by the multi-screen layout
     92 *          and so have potentially incorrect guest size hint posted into guest event queue. Machine-view will try to
     93 *          automatically adjust guest-screen size as soon as possible.
     94 */
     95bool UIFrameBuffer::isAutoEnabled() const
     96{
     97    return m_fIsAutoEnabled;
     98}
     99
     100/**
     101 * Sets the framebuffer <b>auto-enabled</b> status.
     102 * @param fIsAutoEnabled determines whether guest-screen corresponding to this framebuffer
     103 *        was automatically enabled by the auto-mount guest-screen auto-pilot.
     104 * @note  <i>Auto-enabled</i> status means the framebuffer was automatically enabled by the multi-screen layout
     105 *        and so have potentially incorrect guest size hint posted into guest event queue. Machine-view will try to
     106 *        automatically adjust guest-screen size as soon as possible.
     107 */
     108void UIFrameBuffer::setAutoEnabled(bool fIsAutoEnabled)
     109{
     110    m_fIsAutoEnabled = fIsAutoEnabled;
    84111}
    85112
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r49262 r49306  
    107107    void setMarkAsUnused(bool fIsMarkAsUnused);
    108108
     109    /* API: Auto-enabled stuff: */
     110    bool isAutoEnabled() const;
     111    void setAutoEnabled(bool fIsAutoEnabled);
     112
    109113    NS_DECL_ISUPPORTS
    110114
     
    214218    int64_t m_WinId;
    215219    bool m_fIsMarkedAsUnused;
     220    bool m_fIsAutoEnabled;
    216221
    217222    /* To avoid a seamless flicker,
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp

    r48892 r49306  
    175175                if (pFrameBuffer->height() > 0)
    176176                    uHeight = pFrameBuffer->height();
     177                pFrameBuffer->setAutoEnabled(true);
    177178            }
    178179            /* Re-enable guest-screen with proper resolution: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r49177 r49306  
    140140{
    141141    /* Check if we should adjust guest to new size: */
    142     if ((int)frameBuffer()->width() != workingArea().size().width() ||
     142    if (frameBuffer()->isAutoEnabled() ||
     143        (int)frameBuffer()->width() != workingArea().size().width() ||
    143144        (int)frameBuffer()->height() != workingArea().size().height())
    144145        if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
     146        {
     147            frameBuffer()->setAutoEnabled(false);
    145148            sltPerformGuestResize(workingArea().size());
     149        }
    146150}
    147151
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp

    r49177 r49306  
    158158{
    159159    /* Check if we should adjust guest to new size: */
    160     if ((int)frameBuffer()->width() != workingArea().size().width() ||
     160    if (frameBuffer()->isAutoEnabled() ||
     161        (int)frameBuffer()->width() != workingArea().size().width() ||
    161162        (int)frameBuffer()->height() != workingArea().size().height())
    162163        if (uisession()->isGuestSupportsGraphics())
     164        {
     165            frameBuffer()->setAutoEnabled(false);
    163166            sltPerformGuestResize(workingArea().size());
     167        }
    164168}
    165169
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