VirtualBox

Changeset 52515 in vbox


Ignore:
Timestamp:
Aug 28, 2014 3:14:25 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: Mac OS X: Runtime UI: Native full-screen: More appropriate initial geometry for window which is about to enter full-screen.

File:
1 edited

Legend:

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

    r52509 r52515  
    3131#include "UIMachineWindowFullscreen.h"
    3232#include "UIMachineView.h"
     33#include "UIFrameBuffer.h"
    3334#include "UIMachineDefs.h"
    3435#include "UIMiniToolBar.h"
     
    298299    else
    299300    {
     301        /* Load normal geometry first of all: */
     302        QRect geo = gEDataManager->machineWindowGeometry(UIVisualStateType_Normal, m_uScreenId, vboxGlobal().managedVMUuid());
     303        /* If normal geometry is null => use frame-buffer size: */
     304        if (geo.isNull())
     305        {
     306            const UIFrameBuffer *pFrameBuffer = uisession()->frameBuffer(m_uScreenId);
     307            geo = QRect(QPoint(0, 0), QSize(pFrameBuffer->width(), pFrameBuffer->height()).boundedTo(workingArea.size()));
     308        }
     309        /* If frame-buffer size is null => use default size: */
     310        if (geo.isNull())
     311            geo = QRect(QPoint(0, 0), QSize(800, 600).boundedTo(workingArea.size()));
    300312        /* Move window to the center of working-area: */
    301         QRect geo = gEDataManager->machineWindowGeometry(UIVisualStateType_Normal, m_uScreenId, vboxGlobal().managedVMUuid());
    302313        geo.moveCenter(workingArea.center());
    303314        setGeometry(geo);
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