VirtualBox

Ignore:
Timestamp:
Mar 20, 2015 11:56:11 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7115: Adjust machine-window on NotifyChange only if the frame-buffer size really changed.

File:
1 edited

Legend:

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

    r54806 r54865  
    246246    if (uisession()->isScreenVisible(m_uScreenId))
    247247    {
    248         /* Check if that notify-change brings actual resize-event: */
    249         const bool fActualResize = frameBuffer()->width() != (ulong)iWidth ||
    250                                    frameBuffer()->height() != (ulong)iHeight;
     248        /* Get old frame-buffer size: */
     249        const QSize frameBufferSizeOld = QSize(frameBuffer()->width(),
     250                                               frameBuffer()->height());
    251251
    252252        /* Perform frame-buffer mode-change: */
    253253        frameBuffer()->handleNotifyChange(iWidth, iHeight);
     254
     255        /* Get new frame-buffer size: */
     256        const QSize frameBufferSizeNew = QSize(frameBuffer()->width(),
     257                                               frameBuffer()->height());
    254258
    255259        /* For 'scale' mode: */
     
    279283
    280284            /* Normalize 'normal' machine-window geometry if necessary: */
    281             if (visualStateType() == UIVisualStateType_Normal && fActualResize)
     285            if (visualStateType() == UIVisualStateType_Normal &&
     286                frameBufferSizeNew != frameBufferSizeOld)
    282287                machineWindow()->normalizeGeometry(true /* adjust position */);
    283288        }
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