VirtualBox

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


Ignore:
Timestamp:
Oct 24, 2011 3:46:58 PM (13 years ago)
Author:
vboxsync
Message:

FE/Qt: slightly cleaner hack for inhibiting unwanted resizes when exiting fullscreen and seamless

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

Legend:

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

    r39076 r39094  
    556556QSize UIMachineView::sizeHint() const
    557557{
     558    if (m_sizeHintOverride.isValid())
     559        return m_sizeHintOverride;
    558560#ifdef VBOX_WITH_DEBUGGER
    559561    // TODO: Fix all DEBUGGER stuff!
     
    858860        /* Reapply maximum size restriction for machine-view: */
    859861        setMaximumSize(sizeHint());
     862
     863        /* Disable the resize hint override hack: */
     864        m_sizeHintOverride = QSize(-1, -1);
    860865
    861866        /* Perform machine-view resize: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r39081 r39094  
    197197    UIFrameBuffer *m_pFrameBuffer;
    198198    KMachineState m_previousState;
     199    /** HACK: when switching out of fullscreen or seamless we wish to override
     200     * the default size hint to avoid short resizes back to fullscreen size.
     201     * Not explicitly initialised (i.e. invalid by default). */
     202    QSize m_sizeHintOverride;
    199203
    200204    /** The policy for calculating the maximum guest resolution which we wish
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r39081 r39094  
    215215             * the following resize() is acted upon. */
    216216            setMaximumSize(hint);
    217             resize(hint);
     217            m_sizeHintOverride = hint;
    218218            sltPerformGuestResize(hint);
    219219        }
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