VirtualBox

Ignore:
Timestamp:
Jan 5, 2023 1:45:20 PM (2 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: No need for auto-enabled frame-buffer property since possible request to resize being allowed on the basis of previously sent hint anyway.

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

Legend:

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

    r97976 r98000  
    291291    void setMarkAsUnused(bool fUnused);
    292292
    293     /** Returns whether frame-buffer is <b>auto-enabled</b>.
    294       * @note Refer to m_fAutoEnabled for more information. */
    295     bool isAutoEnabled() const { return m_fAutoEnabled; }
    296     /** Defines whether frame-buffer is <b>auto-enabled</b>.
    297       * @note Refer to m_fAutoEnabled for more information. */
    298     void setAutoEnabled(bool fAutoEnabled) { m_fAutoEnabled = fAutoEnabled; }
    299 
    300293    /** Returns the frame-buffer's scaled-size. */
    301294    QSize scaledSize() const { return m_scaledSize; }
     
    512505      * <b>Unused</b> status determines whether frame-buffer should ignore EMT events or not. */
    513506    bool m_fUnused;
    514 
    515     /** Defines whether frame-buffer is <b>auto-enabled</b>.
    516       * <b>Auto-enabled</b> status means that guest-screen corresponding to this frame-buffer
    517       * was automatically enabled by the multi-screen layout (auto-mount guest-screen) functionality,
    518       * so have potentially incorrect size-hint posted into guest event queue.
    519       * Machine-view will try to automatically adjust guest-screen size as soon as possible. */
    520     bool m_fAutoEnabled;
    521507
    522508    /** RTCRITSECT object to protect frame-buffer access. */
     
    11021088    , m_fUpdatesAllowed(false)
    11031089    , m_fUnused(false)
    1104     , m_fAutoEnabled(false)
    11051090    , m_dScaleFactor(1.0)
    11061091    , m_enmScalingOptimizationType(ScalingOptimizationType_None)
     
    24142399}
    24152400
    2416 bool UIFrameBuffer::isAutoEnabled() const
    2417 {
    2418     return m_pFrameBuffer->isAutoEnabled();
    2419 }
    2420 
    2421 void UIFrameBuffer::setAutoEnabled(bool fAutoEnabled)
    2422 {
    2423     m_pFrameBuffer->setAutoEnabled(fAutoEnabled);
    2424 }
    2425 
    24262401QSize UIFrameBuffer::scaledSize() const
    24272402{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r96407 r98000  
    9191    void setMarkAsUnused(bool fUnused);
    9292
    93     /** Returns whether frame-buffer is <b>auto-enabled</b>.
    94       * @note Refer to m_fAutoEnabled for more information. */
    95     bool isAutoEnabled() const;
    96     /** Defines whether frame-buffer is <b>auto-enabled</b>.
    97       * @note Refer to m_fAutoEnabled for more information. */
    98     void setAutoEnabled(bool fAutoEnabled);
    99 
    10093    /** Returns the frame-buffer's scaled-size. */
    10194    QSize scaledSize() const;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp

    r97682 r98000  
    168168                if (pFrameBuffer->height() > 0)
    169169                    uHeight = pFrameBuffer->height();
    170                 pFrameBuffer->setAutoEnabled(true);
    171170            }
    172171            /* Re-enable guest-screen with proper resolution: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r97995 r98000  
    138138    bool fAdjust = false;
    139139
    140     /* Step 1: Was the guest-screen enabled automatically? */
    141     if (!fAdjust)
    142     {
    143         if (frameBuffer()->isAutoEnabled())
    144         {
    145             LogRel2(("GUI: UIMachineViewFullscreen::adjustGuestScreenSize: Guest-screen was enabled automatically, adjustment is required.\n"));
    146             fAdjust = true;
    147         }
    148     }
    149     /* Step 2: Is the guest-screen of another size than necessary? */
     140    /* Step 1: Is the guest-screen of another size than necessary? */
    150141    if (!fAdjust)
    151142    {
     
    165156    }
    166157
    167     /* Step 3: Is guest-screen visible? */
     158    /* Step 2: Is guest-screen visible? */
    168159    if (fAdjust)
    169160    {
     
    174165        }
    175166    }
    176     /* Step 4: Is guest-screen auto-resize enabled? */
     167    /* Step 3: Is guest-screen auto-resize enabled? */
    177168    if (fAdjust)
    178169    {
     
    187178    if (fAdjust)
    188179    {
    189         frameBuffer()->setAutoEnabled(false);
    190180        sltPerformGuestResize(calculateMaxGuestSize());
    191181        /* And remember the size to know what we are resizing out of when we exit: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp

    r97995 r98000  
    151151    bool fAdjust = false;
    152152
    153     /* Step 1: Was the guest-screen enabled automatically? */
    154     if (!fAdjust)
    155     {
    156         if (frameBuffer()->isAutoEnabled())
    157         {
    158             LogRel2(("GUI: UIMachineViewSeamless::adjustGuestScreenSize: Guest-screen was enabled automatically, adjustment is required.\n"));
    159             fAdjust = true;
    160         }
    161     }
    162     /* Step 2: Is the guest-screen of another size than necessary? */
     153    /* Step 1: Is the guest-screen of another size than necessary? */
    163154    if (!fAdjust)
    164155    {
     
    178169    }
    179170
    180     /* Step 3: Is guest-screen visible? */
     171    /* Step 2: Is guest-screen visible? */
    181172    if (fAdjust)
    182173    {
     
    191182    if (fAdjust)
    192183    {
    193         frameBuffer()->setAutoEnabled(false);
    194184        sltPerformGuestResize(calculateMaxGuestSize());
    195185        /* And remember the size to know what we are resizing out of when we exit: */
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