VirtualBox

Changeset 97976 in vbox


Ignore:
Timestamp:
Jan 4, 2023 11:56:32 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155067
Message:

FE/Qt: Runtime UI: Small cleanup for maximum guest size stuff.

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

Legend:

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

    r97512 r97976  
    14911491    /* Determine if supported: */
    14921492    *pfSupported = TRUE;
    1493     QSize screenSize = m_pMachineView->maxGuestSize();
     1493    const QSize screenSize = m_pMachineView->maximumGuestSize();
    14941494    if (   (screenSize.width() != 0)
    14951495        && (uWidth > (ULONG)screenSize.width())
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r97856 r97976  
    188188
    189189    /* Set a preliminary maximum size: */
    190     pMachineView->setMaxGuestSize();
     190    pMachineView->setMaximumGuestSize();
    191191
    192192    /* Resend the last resize hint finally: */
     
    294294
    295295    /* Update current window size limitations: */
    296     setMaxGuestSize(size);
     296    setMaximumGuestSize(size);
    297297
    298298    /* Record the hint to extra data, needed for guests using VMSVGA:
     
    421421
    422422        /* Update current window size limitations: */
    423         setMaxGuestSize(QSize(uWidth, uHeight));
     423        setMaximumGuestSize(QSize(uWidth, uHeight));
    424424
    425425        /* Record the hint to extra data, needed for guests using VMSVGA:
     
    472472
    473473    /* Update current window size limitations: */
    474     setMaxGuestSize(size);
     474    setMaximumGuestSize(size);
    475475
    476476    /* Record the hint to extra data, needed for guests using VMSVGA:
     
    661661void UIMachineView::sltDesktopResized()
    662662{
    663     setMaxGuestSize();
     663    setMaximumGuestSize();
    664664}
    665665
     
    841841    , m_iHostScreenNumber(0)
    842842    , m_enmMaximumGuestScreenSizePolicy(MaximumGuestScreenSizePolicy_Automatic)
    843     , m_u64MaxGuestSize(0)
     843    , m_u64MaximumGuestSize(0)
    844844#ifdef VBOX_WITH_DRAG_AND_DROP_GH
    845845    , m_fIsDraggingFromGuest(false)
     
    12151215}
    12161216
    1217 void UIMachineView::setMaxGuestSize(const QSize &minimumSizeHint /* = QSize() */)
     1217void UIMachineView::setMaximumGuestSize(const QSize &minimumSizeHint /* = QSize() */)
    12181218{
    12191219    QSize maxSize;
     
    12301230            maxSize = QSize(0, 0);
    12311231    }
    1232     ASMAtomicWriteU64(&m_u64MaxGuestSize,
     1232    ASMAtomicWriteU64(&m_u64MaximumGuestSize,
    12331233                      RT_MAKE_U64(maxSize.height(), maxSize.width()));
    12341234}
    12351235
    1236 QSize UIMachineView::maxGuestSize()
    1237 {
    1238     uint64_t u64Size = ASMAtomicReadU64(&m_u64MaxGuestSize);
     1236QSize UIMachineView::maximumGuestSize()
     1237{
     1238    uint64_t u64Size = ASMAtomicReadU64(&m_u64MaximumGuestSize);
    12391239    return QSize(int(RT_HI_U32(u64Size)), int(RT_LO_U32(u64Size)));
    12401240}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r97792 r97976  
    223223    ulong screenId() const { return m_uScreenId; }
    224224    UIFrameBuffer* frameBuffer() const { return m_pFrameBuffer; }
     225
    225226    /** Atomically store the maximum guest resolution which we currently wish
    226      * to handle for @a maxGuestSize() to read.  Should be called if anything
     227     * to handle for @a maximumGuestSize() to read.  Should be called if anything
    227228     * happens (e.g. a screen hotplug) which might cause the value to change.
    228      * @sa m_u64MaxGuestSize. */
    229     void setMaxGuestSize(const QSize &minimumSizeHint = QSize());
     229     * @sa m_u64MaximumGuestSize. */
     230    void setMaximumGuestSize(const QSize &minimumSizeHint = QSize());
    230231    /** Atomically read the maximum guest resolution which we currently wish to
    231232     * handle.  This may safely be called from another thread (called by
    232233     * UIFramebuffer on EMT).
    233      * @sa m_u64MaxGuestSize. */
    234     QSize maxGuestSize();
     234     * @sa m_u64MaximumGuestSize. */
     235    QSize maximumGuestSize();
    235236
    236237    /** Retrieves the last guest-screen visibility status from extra-data. */
     
    401402     */
    402403    /** @todo This should be private. */
    403     volatile uint64_t m_u64MaxGuestSize;
     404    volatile uint64_t m_u64MaximumGuestSize;
    404405
    405406    /** Holds the pause-pixmap. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r97975 r97976  
    7777                    break;
    7878
    79                 /* Recalculate max guest size: */
    80                 setMaxGuestSize();
     79                /* Recalculate maximum guest size: */
     80                setMaximumGuestSize();
    8181
    8282                break;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r97975 r97976  
    6666            case QEvent::Resize:
    6767            {
    68                 /* Recalculate max guest size: */
    69                 setMaxGuestSize();
     68                /* Recalculate maximum guest size: */
     69                setMaximumGuestSize();
    7070                /* And resize guest to current window size: */
    7171                if (m_fGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
     
    158158
    159159    /* Expand current limitations: */
    160     setMaxGuestSize(sizeHint);
     160    setMaximumGuestSize(sizeHint);
    161161
    162162    /* Temporarily restrict the size to prevent a brief resize to the
     
    201201
    202202    /* Adjust guest-screen size if the last size hint is too big for the screen: */
    203     const QSize maxGuestSize = calculateMaxGuestSize();
    204     if (   maxGuestSize.width() < frameBufferSize.width()
    205         || maxGuestSize.height() < frameBufferSize.height())
     203    const QSize maximumGuestSize = calculateMaxGuestSize();
     204    if (   maximumGuestSize.width() < frameBufferSize.width()
     205        || maximumGuestSize.height() < frameBufferSize.height())
    206206        sltPerformGuestResize(machineWindow()->centralWidget()->size());
    207207}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp

    r97682 r97976  
    172172
    173173    /* Expand current limitations: */
    174     setMaxGuestSize(sizeHint);
     174    setMaximumGuestSize(sizeHint);
    175175
    176176    /* Send saved size-hint to the guest: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp

    r97682 r97976  
    8888                    break;
    8989
    90                 /* Recalculate max guest size: */
    91                 setMaxGuestSize();
     90                /* Recalculate maximum guest size: */
     91                setMaximumGuestSize();
    9292
    9393                break;
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