VirtualBox

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


Ignore:
Timestamp:
Feb 28, 2010 2:57:36 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: new core: initial fs support

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
1 added
8 edited
6 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r26823 r26889  
    225225VBOX_GUI_INC_DIRS += \
    226226    ./src/runtime \
    227         ./src/runtime/normal
     227        ./src/runtime/normal \
     228        ./src/runtime/fullscreen
    228229endif
    229230
     
    372373        src/runtime/normal/UIMachineLogicNormal.h \
    373374        src/runtime/normal/UIMachineWindowNormal.h \
    374         src/runtime/normal/UIMachineViewNormal.h
     375        src/runtime/normal/UIMachineViewNormal.h \
     376        src/runtime/fullscreen/UIMachineLogicFullscreen.h \
     377        src/runtime/fullscreen/UIMachineWindowFullscreen.h \
     378        src/runtime/fullscreen/UIMachineViewFullscreen.h
    375379endif
    376380
     
    501505        src/runtime/normal/UIMachineLogicNormal.cpp \
    502506        src/runtime/normal/UIMachineWindowNormal.cpp \
    503         src/runtime/normal/UIMachineViewNormal.cpp
     507        src/runtime/normal/UIMachineViewNormal.cpp \
     508        src/runtime/fullscreen/UIMachineLogicFullscreen.cpp \
     509        src/runtime/fullscreen/UIMachineWindowFullscreen.cpp \
     510        src/runtime/fullscreen/UIMachineViewFullscreen.cpp
    504511endif
    505512
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r26868 r26889  
    395395        else if (mGlobal.isVMConsoleProcess())
    396396        {
     397#ifndef VBOX_WITH_NEW_RUNTIME_CORE
     398            /* TODO_NEW_CORE */
    397399            /* Check for the currently running machine */
    398400            CMachine machine = mGlobal.consoleWnd().session().GetMachine();
     
    409411                }
    410412            }
     413#endif /* VBOX_WITH_NEW_RUNTIME_CORE */
    411414        }
    412415#endif /* Q_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r26868 r26889  
    4545#include "UIMachineLogic.h"
    4646#include "UIMachineLogicNormal.h"
    47 //#include "UIMachineLogicFullscreen.h"
     47#include "UIMachineLogicFullscreen.h"
    4848//#include "UIMachineLogicSeamless.h"
    4949#include "UIMachineWindow.h"
     
    352352            break;
    353353        case UIVisualStateType_Fullscreen:
    354             // logic = new UIMachineLogicFullscreen(pParent, pSession, pActionsPool);
    355             logic = new UIMachineLogicNormal(pParent, pSession, pActionsPool);
     354            logic = new UIMachineLogicFullscreen(pParent, pSession, pActionsPool);
    356355            break;
    357356        case UIVisualStateType_Seamless:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r26878 r26889  
    4343#include "UIMachineView.h"
    4444#include "UIMachineViewNormal.h"
     45#include "UIMachineViewFullscreen.h"
    4546
    4647#ifdef Q_WS_PM
     
    127128            break;
    128129        case UIVisualStateType_Fullscreen:
    129             view = new UIMachineViewNormal(  pMachineWindow
    130                                            , renderMode
     130            view = new UIMachineViewFullscreen(  pMachineWindow
     131                                               , renderMode
    131132#ifdef VBOX_WITH_VIDEOHWACCEL
    132                                            , bAccelerate2DVideo
    133 #endif
    134                                           );
     133                                               , bAccelerate2DVideo
     134#endif
     135                                              );
    135136            break;
    136137        case UIVisualStateType_Seamless:
     
    184185}
    185186
     187#include <QMainWindow>
    186188UIMachineView::UIMachineView(  UIMachineWindow *pMachineWindow
    187189                             , VBoxDefs::RenderMode renderMode
     
    190192#endif
    191193                            )
     194// TODO_NEW_CORE: really think of if this is right
     195//    : QAbstractScrollArea(((QMainWindow*)pMachineWindow->machineWindow())->centralWidget())
    192196    : QAbstractScrollArea(pMachineWindow->machineWindow())
     197    , m_desktopGeometryType(DesktopGeo_Invalid)
    193198    , m_pMachineWindow(pMachineWindow)
    194199    , m_mode(renderMode)
     
    417422{
    418423    /* Prepare view frame: */
    419     //setFrameStyle(QFrame::NoFrame);
     424    setFrameStyle(QFrame::NoFrame);
    420425
    421426    /* Pressed keys: */
     
    514519        initMappedX11Keyboard(QX11Info::display(), vboxGlobal().settings().publicProperty("GUI/RemapScancodes"));
    515520#endif
     521
     522        /* Remember the desktop geometry and register for geometry
     523         * change events for telling the guest about video modes we like: */
     524        QString desktopGeometry = vboxGlobal().settings().publicProperty("GUI/MaxGuestResolution");
     525        if ((desktopGeometry == QString::null) || (desktopGeometry == "auto"))
     526            setDesktopGeometry(DesktopGeo_Automatic, 0, 0);
     527        else if (desktopGeometry == "any")
     528            setDesktopGeometry(DesktopGeo_Any, 0, 0);
     529        else
     530        {
     531            int width = desktopGeometry.section(',', 0, 0).toInt();
     532            int height = desktopGeometry.section(',', 1, 1).toInt();
     533            setDesktopGeometry(DesktopGeo_Fixed, width, height);
     534        }
    516535    }
    517536
     
    532551#endif
    533552}
     553
     554QSize UIMachineView::desktopGeometry() const
     555{
     556    QSize geometry;
     557    switch (m_desktopGeometryType)
     558    {
     559        case DesktopGeo_Fixed:
     560        case DesktopGeo_Automatic:
     561            geometry = QSize(qMax(m_desktopGeometry.width(), m_storedConsoleSize.width()),
     562                             qMax(m_desktopGeometry.height(), m_storedConsoleSize.height()));
     563            break;
     564        case DesktopGeo_Any:
     565            geometry = QSize(0, 0);
     566            break;
     567        default:
     568            AssertMsgFailed(("Bad geometry type %d!\n", m_desktopGeometryType));
     569    }
     570    return geometry;
     571}
     572
     573void UIMachineView::setDesktopGeometry(DesktopGeo geometry, int aWidth, int aHeight)
     574{
     575    switch (geometry)
     576    {
     577        case DesktopGeo_Fixed:
     578            m_desktopGeometryType = DesktopGeo_Fixed;
     579            if (aWidth != 0 && aHeight != 0)
     580                m_desktopGeometry = QSize(aWidth, aHeight);
     581            else
     582                m_desktopGeometry = QSize(0, 0);
     583            storeConsoleSize(0, 0);
     584            break;
     585        case DesktopGeo_Automatic:
     586            m_desktopGeometryType = DesktopGeo_Automatic;
     587            m_desktopGeometry = QSize(0, 0);
     588            storeConsoleSize(0, 0);
     589            break;
     590        case DesktopGeo_Any:
     591            m_desktopGeometryType = DesktopGeo_Any;
     592            m_desktopGeometry = QSize(0, 0);
     593            break;
     594        default:
     595            AssertMsgFailed(("Invalid desktop geometry type %d\n", geometry));
     596            m_desktopGeometryType = DesktopGeo_Invalid;
     597    }
     598}
     599
     600void UIMachineView::calculateDesktopGeometry()
     601{
     602    /* This method should not get called until we have initially set up the m_desktopGeometryType: */
     603    Assert((m_desktopGeometryType != DesktopGeo_Invalid));
     604    /* If we are not doing automatic geometry calculation then there is nothing to do: */
     605    if (DesktopGeo_Automatic == m_desktopGeometryType)
     606    {
     607        /* Available geometry of the desktop.  If the desktop is a single
     608         * screen, this will exclude space taken up by desktop taskbars
     609         * and things, but this is unfortunately not true for the more
     610         * complex case of a desktop spanning multiple screens: */
     611        QRect desktop = availableGeometry();
     612        /* The area taken up by the machine window on the desktop,
     613         * including window frame, title and menu bar and whatnot: */
     614        QRect frame = machineWindowWrapper()->machineWindow()->frameGeometry();
     615        /* The area taken up by the machine view, so excluding all decorations: */
     616        QRect window = geometry();
     617        /* To work out how big we can make the console window while still
     618         * fitting on the desktop, we calculate desktop - frame + window.
     619         * This works because the difference between frame and window
     620         * (or at least its width and height) is a constant. */
     621        m_desktopGeometry = QSize(desktop.width() - frame.width() + window.width(),
     622                                  desktop.height() - frame.height() + window.height());
     623    }
     624}
     625
     626void UIMachineView::storeConsoleSize(int iWidth, int iHeight)
     627{
     628    m_storedConsoleSize = QSize(iWidth, iHeight);
     629}
     630
    534631
    535632void UIMachineView::cleanupCommon()
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r26878 r26889  
    5151
    5252public:
     53
     54    /* Desktop geometry types: */
     55    enum DesktopGeo { DesktopGeo_Invalid = 0, DesktopGeo_Fixed, DesktopGeo_Automatic, DesktopGeo_Any };
    5356
    5457    /* Factory function to create required view sub-child: */
     
    113116    bool isFrameBufferResizeIgnored() const { return m_bIsFrameBufferResizeIgnored; }
    114117    const QPixmap& pauseShot() const { return m_pauseShot; }
    115     virtual QSize desktopGeometry() const = 0;
     118    void calculateDesktopGeometry();
     119    virtual QSize desktopGeometry() const;
     120    void setDesktopGeometry(DesktopGeo geometry, int iWidth, int iHeight);
     121    void storeConsoleSize(int iWidth, int iHeight);
    116122
    117123    /* Protected setters: */
     
    158164# endif
    159165#endif
     166protected:
     167
     168    DesktopGeo m_desktopGeometryType;
     169    QSize m_desktopGeometry;
     170    QSize m_storedConsoleSize;
    160171
    161172private:
     
    205216    void sendChangedKeyStates();
    206217
     218    virtual QRect availableGeometry() = 0;
     219
    207220    static void dimImage(QImage &img);
    208221
     
    254267
    255268    /* Friend classes: */
     269    friend class UIMachineWindowFullscreen;
    256270    friend class UIFrameBuffer;
    257271    friend class UIFrameBufferQImage;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r26882 r26889  
    3838#include "UIMachineView.h"
    3939#include "UIMachineWindowNormal.h"
    40 //#include "UIMachineWindowFullscreen.h"
     40#include "UIMachineWindowFullscreen.h"
    4141//#include "UIMachineWindowSeamless.h"
    4242
     
    5050            break;
    5151        case UIVisualStateType_Fullscreen:
    52             // window = new UIMachineWindowFullscreen(pMachineLogic);
    53             window = new UIMachineWindowNormal(pMachineLogic);
     52            window = new UIMachineWindowFullscreen(pMachineLogic);
    5453            break;
    5554        case UIVisualStateType_Seamless:
     
    508507    m_pLeftSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
    509508    m_pRightSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
     509
    510510    m_pMachineViewContainer->addItem(m_pTopSpacer, 0, 1);
    511511    m_pMachineViewContainer->addItem(m_pBottomSpacer, 2, 1);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r26849 r26889  
    33 *
    44 * VBox frontends: Qt GUI ("VirtualBox"):
    5  * UIMachineLogicNormal class implementation
     5 * UIMachineLogicFullscreen class implementation
    66 */
    77
     
    2424/* Global includes */
    2525#include <QMenu>
    26 #include <QTimer>
     26#include <QDesktopWidget>
    2727
    2828/* Local includes */
     
    3535#include "UISession.h"
    3636#include "UIActionsPool.h"
    37 #include "UIMachineLogicNormal.h"
     37#include "UIMachineLogicFullscreen.h"
    3838#include "UIMachineWindow.h"
    3939#include "UIMachineView.h"
     
    4141#include "VBoxUtils.h"
    4242
    43 UIMachineLogicNormal::UIMachineLogicNormal(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
    44     : UIMachineLogic(pParent, pSession, pActionsPool, UIVisualStateType_Normal)
     43UIMachineLogicFullscreen::UIMachineLogicFullscreen(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
     44    : UIMachineLogic(pParent, pSession, pActionsPool, UIVisualStateType_Fullscreen)
    4545{
    4646    /* Prepare console connections: */
     
    5656    prepareRequiredFeatures();
    5757
    58     /* Prepare normal machine window: */
     58    /* Prepare machine window: */
    5959    prepareMachineWindow();
    6060
     
    6565}
    6666
    67 UIMachineLogicNormal::~UIMachineLogicNormal()
    68 {
    69     /* Cleanup normal machine window: */
     67UIMachineLogicFullscreen::~UIMachineLogicFullscreen()
     68{
     69    /* Cleanup machine window: */
    7070    cleanupMachineWindow();
    7171}
    7272
    73 void UIMachineLogicNormal::sltPrepareNetworkAdaptersMenu()
     73void UIMachineLogicFullscreen::sltPrepareNetworkAdaptersMenu()
    7474{
    7575    QMenu *menu = qobject_cast<QMenu*>(sender());
     
    7979}
    8080
    81 void UIMachineLogicNormal::sltPrepareSharedFoldersMenu()
     81void UIMachineLogicFullscreen::sltPrepareSharedFoldersMenu()
    8282{
    8383    QMenu *menu = qobject_cast<QMenu*>(sender());
     
    8787}
    8888
    89 void UIMachineLogicNormal::sltPrepareMouseIntegrationMenu()
     89void UIMachineLogicFullscreen::sltPrepareMouseIntegrationMenu()
    9090{
    9191    QMenu *menu = qobject_cast<QMenu*>(sender());
     
    9595}
    9696
    97 void UIMachineLogicNormal::prepareActionConnections()
     97void UIMachineLogicFullscreen::prepareActionConnections()
    9898{
    9999    /* Base class connections: */
     
    109109}
    110110
    111 void UIMachineLogicNormal::prepareMachineWindow()
     111void UIMachineLogicFullscreen::prepareRequiredFeatures()
     112{
     113    // TODO_NEW_CORE
     114//    if (session().GetConsole().isAutoresizeGuestActive())
     115    {
     116//        QRect screen = QApplication::desktop()->screenGeometry(this);
     117//        ULONG64 availBits = session().GetMachine().GetVRAMSize() /* vram */
     118//                          * _1M /* mb to bytes */
     119//                          * 8; /* to bits */
     120//        ULONG guestBpp = mConsole->console().GetDisplay().GetBitsPerPixel();
     121//        ULONG64 usedBits = (screen.width() /* display width */
     122//                         * screen.height() /* display height */
     123//                         * guestBpp
     124//                         + _1M * 8) /* current cache per screen - may be changed in future */
     125//                         * session().GetMachine().GetMonitorCount() /**< @todo fix assumption that all screens have same resolution */
     126//                         + 4096 * 8; /* adapter info */
     127//        if (availBits < usedBits)
     128//        {
     129//            int result = vboxProblem().cannotEnterFullscreenMode(
     130//                   screen.width(), screen.height(), guestBpp,
     131//                   (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M);
     132//            if (result == QIMessageBox::Cancel)
     133//                sltClose();
     134//        }
     135    }
     136}
     137
     138void UIMachineLogicFullscreen::prepareMachineWindow()
    112139{
    113140    /* Do not prepare window if its ready: */
     
    213240}
    214241
    215 void UIMachineLogicNormal::cleanupMachineWindow()
     242void UIMachineLogicFullscreen::cleanupMachineWindow()
    216243{
    217244    /* Do not cleanup machine window if it is not present: */
     
    219246        return;
    220247
    221     /* Cleanup normal machine window: */
     248    /* Cleanup machine window: */
    222249    UIMachineWindow::destroy(machineWindowWrapper());
    223250    setMachineWindowWrapper(0);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h

    r26849 r26889  
    22 *
    33 * VBox frontends: Qt GUI ("VirtualBox"):
    4  * UIMachineLogicNormal class declaration
     4 * UIMachineLogicFullscreen class declaration
    55 */
    66
     
    2121 */
    2222
    23 #ifndef __UIMachineLogicNormal_h__
    24 #define __UIMachineLogicNormal_h__
     23#ifndef __UIMachineLogicFullscreen_h__
     24#define __UIMachineLogicFullscreen_h__
    2525
    2626/* Local includes */
     
    3030class UIActionsPool;
    3131
    32 class UIMachineLogicNormal : public UIMachineLogic
     32class UIMachineLogicFullscreen : public UIMachineLogic
    3333{
    3434    Q_OBJECT;
     
    3636protected:
    3737
    38     /* Normal machine logic constructor/destructor: */
    39     UIMachineLogicNormal(QObject *pParent,
    40                          UISession *pSession,
    41                          UIActionsPool *pActionsPool);
    42     virtual ~UIMachineLogicNormal();
     38    /* Fullscreen machine logic constructor/destructor: */
     39    UIMachineLogicFullscreen(QObject *pParent,
     40                             UISession *pSession,
     41                             UIActionsPool *pActionsPool);
     42    virtual ~UIMachineLogicFullscreen();
    4343
    4444private slots:
     
    5454    void prepareActionConnections();
    5555    void prepareMachineWindow();
     56    void prepareRequiredFeatures();
    5657
    5758    /* Cleanup helpers: */
     
    6364};
    6465
    65 #endif // __UIMachineLogicNormal_h__
     66#endif // __UIMachineLogicFullscreen_h__
    6667
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r26849 r26889  
    33 *
    44 * VBox frontends: Qt GUI ("VirtualBox"):
    5  * UIMachineViewNormal class implementation
     5 * UIMachineViewFullscreen class implementation
    66 */
    77
     
    2525#include <QApplication>
    2626#include <QDesktopWidget>
    27 #include <QMainWindow>
    2827#include <QMenuBar>
     28#include <QTimer>
    2929
    3030/* Local includes */
     
    3434#include "UIMachineLogic.h"
    3535#include "UIMachineWindow.h"
    36 #include "UIMachineViewNormal.h"
    37 
    38 UIMachineViewNormal::UIMachineViewNormal(  UIMachineWindow *pMachineWindow
     36#include "UIFrameBuffer.h"
     37#include "UIMachineViewFullscreen.h"
     38#include "QIMainDialog.h"
     39
     40UIMachineViewFullscreen::UIMachineViewFullscreen(  UIMachineWindow *pMachineWindow
    3941                                         , VBoxDefs::RenderMode renderMode
    4042#ifdef VBOX_WITH_VIDEOHWACCEL
     
    4850#endif
    4951                   )
     52    , m_bIsGuestAutoresizeEnabled(pMachineWindow->machineLogic()->actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize)->isChecked())
     53    , m_fShouldWeDoResize(false)
    5054{
    5155    /* Prepare frame buffer: */
     
    7175}
    7276
    73 UIMachineViewNormal::~UIMachineViewNormal()
     77UIMachineViewFullscreen::~UIMachineViewFullscreen()
    7478{
    7579    /* Cleanup common things: */
     
    8084}
    8185
    82 void UIMachineViewNormal::sltPerformGuestResize(const QSize & /* toSize */)
    83 {
    84 #if 0 // TODO: fix that logic!
    85     if (isGuestSupportsGraphics() && m_bIsGuestAutoresizeEnabled)
    86     {
     86void UIMachineViewFullscreen::sltAdditionsStateChanged()
     87{
     88    /* Check if we should restrict minimum size: */
     89    maybeRestrictMinimumSize();
     90}
     91
     92void UIMachineViewFullscreen::sltPerformGuestResize(const QSize &toSize)
     93{
     94    if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
     95    {
     96        /* Taking Main Dialog: */
     97        QIMainDialog *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
     98                                    qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;
     99
    87100        /* If this slot is invoked directly then use the passed size
    88101         * otherwise get the available size for the guest display.
    89102         * We assume here that the centralWidget() contains this view only
    90103         * and gives it all available space. */
    91         QSize sz(toSize.isValid() ? toSize : machineWindow()->centralWidget()->size());
     104        QSize newSize(toSize.isValid() ? toSize : pMainDialog ? pMainDialog->centralWidget()->size() : QSize());
     105        AssertMsg(newSize.isValid(), ("This size should be valid!\n"));
     106
     107        /* Subtracting frame in case we basing on machine view size: */
    92108        if (!toSize.isValid())
    93             sz -= QSize(frameWidth() * 2, frameWidth() * 2);
    94         /* Do not send out useless hints. */
    95         if ((sz.width() == mStoredConsoleSize.width()) && (sz.height() == mStoredConsoleSize.height()))
     109            newSize -= QSize(frameWidth() * 2, frameWidth() * 2);
     110
     111        /* Do not send the same hints as we already have: */
     112        if ((newSize.width() == m_storedConsoleSize.width()) && (newSize.height() == m_storedConsoleSize.height()))
    96113            return;
     114
    97115        /* We only actually send the hint if
    98116         * 1) the autoresize property is set to true and
     
    102120         *    needed (e.g. the autoresize was just enabled and the console
    103121         *    was resized while it was disabled). */
    104         if (m_bIsGuestAutoresizeEnabled && (toSize.isValid() || mDoResize))
     122        if (toSize.isValid() || m_fShouldWeDoResize)
    105123        {
    106124            /* Remember the new size. */
    107             storeConsoleSize(sz.width(), sz.height());
    108 
    109             mConsole.GetDisplay().SetVideoModeHint(sz.width(), sz.height(), 0, 0);
     125            m_storedConsoleSize = newSize;
     126
     127            /* Send new size-hint to the guest: */
     128            session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, 0);
    110129        }
    111         /* We have resized now... */
    112         mDoResize = false;
    113     }
    114 #endif
    115 }
    116 
    117 void UIMachineViewNormal::sltAdditionsStateChanged()
    118 {
    119     /* Base-class additions state-change-handler: */
    120     UIMachineView::sltAdditionsStateChanged();
    121 
    122     /* Enable/Disable guest auto-resizing depending on advanced graphics availablability: */
    123     setGuestAutoresizeEnabled(m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics());
    124 }
    125 
    126 void UIMachineViewNormal::prepareFilters()
    127 {
    128     /* Prepare base-class filters: */
     130        /* We had requested resize now, rejecting accident requests: */
     131        m_fShouldWeDoResize = false;
     132    }
     133}
     134
     135/* If the desktop geometry is set automatically, this will update it: */
     136void UIMachineViewFullscreen::sltDesktopResized()
     137{
     138    calculateDesktopGeometry();
     139}
     140
     141void UIMachineViewFullscreen::prepareCommon()
     142{
     143    UIMachineView::prepareCommon();
     144
     145    /* Maximum size of the screen */
     146    setMaximumSize(availableGeometry().size());
     147    /* Minimum size is ignored too */
     148    setMinimumSize(0, 0);
     149    /* No scrollbars */
     150    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     151    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     152}
     153
     154void UIMachineViewFullscreen::prepareFilters()
     155{
     156    /* Base-class filters: */
    129157    UIMachineView::prepareFilters();
    130158
    131159    /* Normal window filters: */
    132     qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);
    133 }
    134 
    135 void UIMachineViewNormal::setGuestAutoresizeEnabled(bool fEnabled)
     160    qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);
     161}
     162
     163void UIMachineViewFullscreen::prepareConsoleConnections()
     164{
     165    /* Base class connections: */
     166    UIMachineView::prepareConsoleConnections();
     167
     168    /* Guest additions state-change updater: */
     169    connect(uisession(), SIGNAL(sigAdditionsStateChange()), this, SLOT(sltAdditionsStateChanged()));
     170}
     171
     172void UIMachineViewFullscreen::loadMachineViewSettings()
     173{
     174    /* Base class settings: */
     175    UIMachineView::loadMachineViewSettings();
     176
     177    /* Global settings: */
     178    {
     179        connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltDesktopResized()));
     180    }
     181}
     182
     183void UIMachineViewFullscreen::setGuestAutoresizeEnabled(bool fEnabled)
    136184{
    137185    if (m_bIsGuestAutoresizeEnabled != fEnabled)
     
    146194}
    147195
    148 void UIMachineViewNormal::normalizeGeometry(bool bAdjustPosition /* = false */)
     196void UIMachineViewFullscreen::normalizeGeometry(bool bAdjustPosition /* = false */)
    149197{
    150198    QWidget *pTopLevelWidget = window();
     
    194242}
    195243
    196 void UIMachineViewNormal::maybeRestrictMinimumSize()
     244QRect UIMachineViewFullscreen::availableGeometry()
     245{
     246    return QApplication::desktop()->screenGeometry(this);
     247}
     248
     249void UIMachineViewFullscreen::maybeRestrictMinimumSize()
    197250{
    198251    /* Sets the minimum size restriction depending on the auto-resize feature state and the current rendering mode.
     
    209262}
    210263
     264bool UIMachineViewFullscreen::event(QEvent *pEvent)
     265{
     266    switch (pEvent->type())
     267    {
     268        case VBoxDefs::ResizeEventType:
     269        {
     270            /* Some situations require initial VGA Resize Request
     271             * to be ignored at all, leaving previous framebuffer,
     272             * machine view and machine window sizes preserved: */
     273            if (uisession()->isGuestResizeIgnored())
     274                return true;
     275
     276            bool oldIgnoreMainwndResize = isMachineWindowResizeIgnored();
     277            setMachineWindowResizeIgnored(true);
     278
     279            UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent);
     280
     281            /* Store the new size to prevent unwanted resize hints being sent back. */
     282            storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());
     283
     284            /* Unfortunately restoreOverrideCursor() is broken in Qt 4.4.0 if WA_PaintOnScreen widgets are present.
     285             * This is the case on linux with SDL. As workaround we save/restore the arrow cursor manually.
     286             * See http://trolltech.com/developer/task-tracker/index_html?id=206165&method=entry for details.
     287             * Moreover the current cursor, which could be set by the guest, should be restored after resize: */
     288            QCursor cursor;
     289            if (uisession()->isHidingHostPointer())
     290                cursor = QCursor(Qt::BlankCursor);
     291            else
     292                cursor = viewport()->cursor();
     293            frameBuffer()->resizeEvent(pResizeEvent);
     294            viewport()->setCursor(cursor);
     295
     296#ifdef Q_WS_MAC
     297            // TODO_NEW_CORE
     298//            mDockIconPreview->setOriginalSize(pResizeEvent->width(), pResizeEvent->height());
     299#endif /* Q_WS_MAC */
     300
     301            /* This event appears in case of guest video was changed for somehow even without video resolution change.
     302             * In this last case the host VM window will not be resized according this event and the host mouse cursor
     303             * which was unset to default here will not be hidden in capture state. So it is necessary to perform
     304             * updateMouseClipping() for the guest resize event if the mouse cursor was captured: */
     305            if (uisession()->isMouseCaptured())
     306                updateMouseClipping();
     307
     308            /* Apply maximum size restriction: */
     309            setMaximumSize(sizeHint());
     310
     311            /* May be we have to restrict minimum size? */
     312            maybeRestrictMinimumSize();
     313
     314            /* Resize the guest canvas: */
     315            if (!isFrameBufferResizeIgnored())
     316                resize(pResizeEvent->width(), pResizeEvent->height());
     317            updateSliders();
     318
     319            /* Let our toplevel widget calculate its sizeHint properly. */
     320#ifdef Q_WS_X11
     321            /* We use processEvents rather than sendPostedEvents & set the time out value to max cause on X11 otherwise
     322             * the layout isn't calculated correctly. Dosn't find the bug in Qt, but this could be triggered through
     323             * the async nature of the X11 window event system. */
     324            QCoreApplication::processEvents(QEventLoop::AllEvents, INT_MAX);
     325#else /* Q_WS_X11 */
     326            QCoreApplication::sendPostedEvents(0, QEvent::LayoutRequest);
     327#endif /* Q_WS_X11 */
     328
     329            if (!isFrameBufferResizeIgnored())
     330                normalizeGeometry(true /* adjustPosition */);
     331
     332            /* Report to the VM thread that we finished resizing */
     333            session().GetConsole().GetDisplay().ResizeCompleted(0);
     334
     335            setMachineWindowResizeIgnored(oldIgnoreMainwndResize);
     336
     337            /* Update geometry after entering fullscreen */
     338            updateGeometry();
     339
     340            /* Make sure that all posted signals are processed: */
     341            qApp->processEvents();
     342
     343            /* Emit a signal about guest was resized: */
     344            emit resizeHintDone();
     345
     346            /* We also recalculate the desktop geometry if this is determined
     347             * automatically.  In fact, we only need this on the first resize,
     348             * but it is done every time to keep the code simpler. */
     349            calculateDesktopGeometry();
     350
     351            // TODO_NEW_CORE: try to understand this, cause this is bullshit in fullscreen
     352            /* Enable frame-buffer resize watching: */
     353//            if (isFrameBufferResizeIgnored())
     354//                setFrameBufferResizeIgnored(false);
     355
     356            return true;
     357        }
     358
     359        case QEvent::KeyPress:
     360        case QEvent::KeyRelease:
     361        {
     362            QKeyEvent *pKeyEvent = static_cast<QKeyEvent*>(pEvent);
     363
     364            if (isHostKeyPressed() && pEvent->type() == QEvent::KeyPress)
     365            {
     366                if (pKeyEvent->key() == Qt::Key_Home)
     367                {
     368                    /* In Qt4 it is not enough to just set the focus to menu-bar.
     369                     * So to get the menu-bar we have to send Qt::Key_Alt press/release events directly: */
     370                    QKeyEvent e1(QEvent::KeyPress, Qt::Key_Alt, Qt::NoModifier);
     371                    QKeyEvent e2(QEvent::KeyRelease, Qt::Key_Alt, Qt::NoModifier);
     372                    QMenuBar *pMenuBar = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
     373                                         qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar() : 0;
     374                    QApplication::sendEvent(pMenuBar, &e1);
     375                    QApplication::sendEvent(pMenuBar, &e2);
     376                }
     377                else
     378                    pEvent->ignore();
     379            }
     380        }
     381        default:
     382            break;
     383    }
     384    return UIMachineView::event(pEvent);
     385}
     386
     387bool UIMachineViewFullscreen::eventFilter(QObject *pWatched, QEvent *pEvent)
     388{
     389    /* Who are we watchin? */
     390    QIMainDialog *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
     391        qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;
     392    QMenuBar *pMenuBar = pMainDialog ? qobject_cast<QIMainDialog*>(pMainDialog)->menuBar() : 0;
     393
     394    if (pWatched != 0 && pWatched == pMainDialog)
     395    {
     396        switch (pEvent->type())
     397        {
     398            case QEvent::Resize:
     399            {
     400                /* Set the "guest needs to resize" hint.
     401                 * This hint is acted upon when (and only when) the autoresize property is "true": */
     402                m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics();
     403                if (!isMachineWindowResizeIgnored() && m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
     404                    QTimer::singleShot(300, this, SLOT(sltPerformGuestResize()));
     405                break;
     406            }
     407#if defined (Q_WS_WIN32)
     408# if defined (VBOX_GUI_USE_DDRAW)
     409            case QEvent::Move:
     410            {
     411                /* Notification from our parent that it has moved. We need this in order
     412                 * to possibly adjust the direct screen blitting: */
     413                if (frameBuffer())
     414                    frameBuffer()->moveEvent(static_cast<QMoveEvent*>(pEvent));
     415                break;
     416            }
     417# endif
     418#endif /* defined (Q_WS_WIN32) */
     419            default:
     420                break;
     421        }
     422    }
     423    else if (pWatched != 0 && pWatched == pMenuBar)
     424    {
     425        /* Sometimes when we press ESC in the menu it brings the focus away (Qt bug?)
     426         * causing no widget to have a focus, or holds the focus itself, instead of
     427         * returning the focus to the console window. Here we fix this: */
     428        switch (pEvent->type())
     429        {
     430            case QEvent::FocusOut:
     431            {
     432                if (qApp->focusWidget() == 0)
     433                    setFocus();
     434                break;
     435            }
     436            case QEvent::KeyPress:
     437            {
     438                QKeyEvent *pKeyEvent = static_cast<QKeyEvent*>(pEvent);
     439                if (pKeyEvent->key() == Qt::Key_Escape && (pKeyEvent->modifiers() == Qt::NoModifier))
     440                    if (pMenuBar->hasFocus())
     441                        setFocus();
     442                break;
     443            }
     444            default:
     445                break;
     446        }
     447    }
     448    return UIMachineView::eventFilter(pWatched, pEvent);
     449}
     450
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h

    r26849 r26889  
    22 *
    33 * VBox frontends: Qt GUI ("VirtualBox"):
    4  * UIMachineViewNormal class declaration
     4 * UIMachineViewFullscreen class declaration
    55 */
    66
     
    2121 */
    2222
    23 #ifndef ___UIMachineViewNormal_h___
    24 #define ___UIMachineViewNormal_h___
     23#ifndef ___UIMachineViewFullscreen_h___
     24#define ___UIMachineViewFullscreen_h___
    2525
    2626/* Local includes */
    2727#include "UIMachineView.h"
    2828
    29 class UIMachineViewNormal : public UIMachineView
     29class UIMachineViewFullscreen : public UIMachineView
    3030{
    3131    Q_OBJECT;
     32
     33signals:
     34
     35    /* Utility signals: */
     36    void resizeHintDone();
    3237
    3338protected:
    3439
    3540    /* Normal machine view constructor/destructor: */
    36     UIMachineViewNormal(  UIMachineWindow *pMachineWindow
     41    UIMachineViewFullscreen(  UIMachineWindow *pMachineWindow
    3742                        , VBoxDefs::RenderMode renderMode
    3843#ifdef VBOX_WITH_VIDEOHWACCEL
     
    4045#endif
    4146    );
    42     virtual ~UIMachineViewNormal();
     47    virtual ~UIMachineViewFullscreen();
    4348
    4449private slots:
     
    5055    void sltPerformGuestResize(const QSize &aSize = QSize());
    5156
     57    /* Watch dog for desktop resizes: */
     58    void sltDesktopResized();
     59
    5260private:
    5361
    5462    /* Prepare routines: */
     63    void prepareCommon();
    5564    void prepareFilters();
     65    void prepareConsoleConnections();
     66    void loadMachineViewSettings();
    5667
    5768    /* Private setters: */
     
    6071    /* Private helpers: */
    6172    void normalizeGeometry(bool bAdjustPosition = false);
     73    QRect availableGeometry();
    6274    void maybeRestrictMinimumSize();
     75
     76    bool event(QEvent *pEvent);
     77    bool eventFilter(QObject *pWatched, QEvent *pEvent);
    6378
    6479    /* Private members: */
    6580    bool m_bIsGuestAutoresizeEnabled : 1;
     81    bool m_fShouldWeDoResize : 1;
    6682
    6783    /* Friend classes: */
     
    6985};
    7086
    71 #endif // !___UIMachineViewNormal_h___
     87#endif // !___UIMachineViewFullscreen_h___
    7288
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp

    r26849 r26889  
    33 *
    44 * VBox frontends: Qt GUI ("VirtualBox"):
    5  * UIMachineWindowNormal class implementation
     5 * UIMachineWindowFullscreen class implementation
    66 */
    77
     
    3333#include "UISession.h"
    3434#include "UIActionsPool.h"
    35 #include "UIIndicatorsPool.h"
    3635#include "UIMachineLogic.h"
    3736#include "UIMachineView.h"
    38 #include "UIMachineWindowNormal.h"
    39 
    40 #include "QIStatusBar.h"
    41 #include "QIStateIndicator.h"
    42 #include "QIHotKeyEdit.h"
    43 
    44 UIMachineWindowNormal::UIMachineWindowNormal(UIMachineLogic *pMachineLogic)
     37#include "UIMachineWindowFullscreen.h"
     38
     39#ifdef Q_WS_MAC
     40# ifdef QT_MAC_USE_COCOA
     41#  include <Carbon/Carbon.h>
     42# endif /* QT_MAC_USE_COCOA */
     43#endif /* Q_WS_MAC */
     44
     45UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic)
    4546    : QIWithRetranslateUI<QIMainDialog>(0)
    4647    , UIMachineWindow(pMachineLogic)
    47     , m_pIndicatorsPool(new UIIndicatorsPool(pMachineLogic->uisession()->session(), this))
    48     , m_pIdleTimer(0)
    4948{
    5049    /* "This" is machine window: */
     
    6059    prepareMenu();
    6160
    62     /* Prepare status bar: */
    63     prepareStatusBar();
    64 
    6561    /* Prepare connections: */
    6662    prepareConnections();
     
    6965    retranslateUi();
    7066
     67    /* Prepare machine view container: */
     68    prepareMachineViewContainer();
     69
    7170    /* Prepare normal machine view: */
    7271    prepareMachineView();
     
    7978
    8079    /* Show window: */
    81     show();
    82 }
    83 
    84 UIMachineWindowNormal::~UIMachineWindowNormal()
     80//    show();
     81}
     82
     83UIMachineWindowFullscreen::~UIMachineWindowFullscreen()
    8584{
    8685    /* Save normal window settings: */
    8786    saveWindowSettings();
    8887
    89     /* Cleanup status-bar: */
    90     cleanupStatusBar();
    91 }
    92 
    93 void UIMachineWindowNormal::sltMachineStateChanged()
     88    /* Cleanup normal machine view: */
     89    cleanupMachineView();
     90}
     91
     92void UIMachineWindowFullscreen::sltMachineStateChanged()
    9493{
    9594    UIMachineWindow::sltMachineStateChanged();
    9695}
    9796
    98 void UIMachineWindowNormal::sltMediumChange(const CMediumAttachment &attachment)
     97void UIMachineWindowFullscreen::sltMediumChange(const CMediumAttachment &attachment)
    9998{
    10099    KDeviceType type = attachment.GetType();
     
    107106}
    108107
    109 void UIMachineWindowNormal::sltUSBControllerChange()
     108void UIMachineWindowFullscreen::sltUSBControllerChange()
    110109{
    111110    updateAppearanceOf(UIVisualElement_USBStuff);
    112111}
    113112
    114 void UIMachineWindowNormal::sltUSBDeviceStateChange()
     113void UIMachineWindowFullscreen::sltUSBDeviceStateChange()
    115114{
    116115    updateAppearanceOf(UIVisualElement_USBStuff);
    117116}
    118117
    119 void UIMachineWindowNormal::sltNetworkAdapterChange()
     118void UIMachineWindowFullscreen::sltNetworkAdapterChange()
    120119{
    121120    updateAppearanceOf(UIVisualElement_NetworkStuff);
    122121}
    123122
    124 void UIMachineWindowNormal::sltSharedFolderChange()
     123void UIMachineWindowFullscreen::sltSharedFolderChange()
    125124{
    126125    updateAppearanceOf(UIVisualElement_SharedFolderStuff);
    127126}
    128127
    129 void UIMachineWindowNormal::sltTryClose()
     128void UIMachineWindowFullscreen::sltTryClose()
    130129{
    131130    UIMachineWindow::sltTryClose();
    132131}
    133132
    134 void UIMachineWindowNormal::sltUpdateIndicators()
    135 {
    136     CConsole console = session().GetConsole();
    137     QIStateIndicator *pStateIndicator = 0;
    138 
    139     pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_HardDisks);
    140     if (pStateIndicator->state() != KDeviceActivity_Null)
    141     {
    142         int state = console.GetDeviceActivity(KDeviceType_HardDisk);
    143         if (pStateIndicator->state() != state)
    144             pStateIndicator->setState(state);
    145     }
    146     pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_OpticalDisks);
    147     if (pStateIndicator->state() != KDeviceActivity_Null)
    148     {
    149         int state = console.GetDeviceActivity(KDeviceType_DVD);
    150         if (pStateIndicator->state() != state)
    151             pStateIndicator->setState(state);
    152     }
    153     pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_USBDevices);
    154     if (pStateIndicator->state() != KDeviceActivity_Null)
    155     {
    156         int state = console.GetDeviceActivity(KDeviceType_USB);
    157         if (pStateIndicator->state() != state)
    158             pStateIndicator->setState(state);
    159     }
    160     pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_NetworkAdapters);
    161     if (pStateIndicator->state() != KDeviceActivity_Null)
    162     {
    163         int state = console.GetDeviceActivity(KDeviceType_Network);
    164         if (pStateIndicator->state() != state)
    165             pStateIndicator->setState(state);
    166     }
    167     pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_SharedFolders);
    168     if (pStateIndicator->state() != KDeviceActivity_Null)
    169     {
    170         int state = console.GetDeviceActivity(KDeviceType_SharedFolder);
    171         if (pStateIndicator->state() != state)
    172             pStateIndicator->setState(state);
    173     }
    174 }
    175 
    176 void UIMachineWindowNormal::sltShowIndicatorsContextMenu(QIStateIndicator *pIndicator, QContextMenuEvent *pEvent)
    177 {
    178     if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_OpticalDisks))
    179     {
    180         if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_OpticalDevices)->isEnabled())
    181             machineLogic()->actionsPool()->action(UIActionIndex_Menu_OpticalDevices)->menu()->exec(pEvent->globalPos());
    182     }
    183     else if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_USBDevices))
    184     {
    185         if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->isEnabled())
    186             machineLogic()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->menu()->exec(pEvent->globalPos());
    187     }
    188     else if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_NetworkAdapters))
    189     {
    190         if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_NetworkAdapters)->isEnabled())
    191             machineLogic()->actionsPool()->action(UIActionIndex_Menu_NetworkAdapters)->menu()->exec(pEvent->globalPos());
    192     }
    193     else if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_SharedFolders))
    194     {
    195         if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_SharedFolders)->isEnabled())
    196             machineLogic()->actionsPool()->action(UIActionIndex_Menu_SharedFolders)->menu()->exec(pEvent->globalPos());
    197     }
    198     else if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_Mouse))
    199     {
    200         if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_MouseIntegration)->isEnabled())
    201             machineLogic()->actionsPool()->action(UIActionIndex_Menu_MouseIntegration)->menu()->exec(pEvent->globalPos());
    202     }
    203 }
    204 
    205 void UIMachineWindowNormal::sltProcessGlobalSettingChange(const char * /* aPublicName */, const char * /* aName */)
    206 {
    207     m_pNameHostkey->setText(QIHotKeyEdit::keyName(vboxGlobal().settings().hostKey()));
    208 }
    209 
    210 void UIMachineWindowNormal::retranslateUi()
     133void UIMachineWindowFullscreen::sltProcessGlobalSettingChange(const char * /* aPublicName */, const char * /* aName */)
     134{
     135}
     136
     137void UIMachineWindowFullscreen::retranslateUi()
    211138{
    212139    /* Translate parent class: */
     
    219146//    m_pDockEnablePreviewMonitor->setText(tr("Show Monitor Preview"));
    220147#endif /* Q_WS_MAC */
    221 
    222     m_pNameHostkey->setToolTip(
    223         tr("Shows the currently assigned Host key.<br>"
    224            "This key, when pressed alone, toggles the keyboard and mouse "
    225            "capture state. It can also be used in combination with other keys "
    226            "to quickly perform actions from the main menu."));
    227     m_pNameHostkey->setText(QIHotKeyEdit::keyName(vboxGlobal().settings().hostKey()));
    228 }
    229 
    230 void UIMachineWindowNormal::updateAppearanceOf(int iElement)
     148}
     149
     150void UIMachineWindowFullscreen::updateAppearanceOf(int iElement)
    231151{
    232152    /* Update parent-class window: */
    233153    UIMachineWindow::updateAppearanceOf(iElement);
    234 
    235     /* Update that machine window: */
    236     if (iElement & UIVisualElement_HDStuff)
    237         indicatorsPool()->indicator(UIIndicatorIndex_HardDisks)->updateAppearance();
    238     if (iElement & UIVisualElement_CDStuff)
    239         indicatorsPool()->indicator(UIIndicatorIndex_OpticalDisks)->updateAppearance();
    240     if (iElement & UIVisualElement_USBStuff &&
    241         !indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)->isHidden())
    242         indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)->updateAppearance();
    243     if (iElement & UIVisualElement_NetworkStuff)
    244         indicatorsPool()->indicator(UIIndicatorIndex_NetworkAdapters)->updateAppearance();
    245     if (iElement & UIVisualElement_SharedFolderStuff)
    246         indicatorsPool()->indicator(UIIndicatorIndex_SharedFolders)->updateAppearance();
    247     if (iElement & UIVisualElement_VirtualizationStuff)
    248         indicatorsPool()->indicator(UIIndicatorIndex_Virtualization)->updateAppearance();
    249 }
    250 
    251 bool UIMachineWindowNormal::event(QEvent *pEvent)
    252 {
     154}
     155
     156bool UIMachineWindowFullscreen::event(QEvent *pEvent)
     157{
     158    return QIWithRetranslateUI<QIMainDialog>::event(pEvent);
    253159    switch (pEvent->type())
    254160    {
     
    285191
    286192#ifdef Q_WS_X11
    287 bool UIMachineWindowNormal::x11Event(XEvent *pEvent)
     193bool UIMachineWindowFullscreen::x11Event(XEvent *pEvent)
    288194{
    289195    /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut,
     
    306212#endif
    307213
    308 void UIMachineWindowNormal::closeEvent(QCloseEvent *pEvent)
     214void UIMachineWindowFullscreen::closeEvent(QCloseEvent *pEvent)
    309215{
    310216    return UIMachineWindow::closeEvent(pEvent);
    311217}
    312218
    313 void UIMachineWindowNormal::prepareConsoleConnections()
     219void UIMachineWindowFullscreen::prepareConsoleConnections()
    314220{
    315221    /* Base-class connections: */
     
    337243}
    338244
    339 void UIMachineWindowNormal::prepareMenu()
     245void UIMachineWindowFullscreen::prepareMenu()
    340246{
    341247    /* Machine submenu: */
     
    364270}
    365271
    366 void UIMachineWindowNormal::prepareStatusBar()
    367 {
    368     /* Common setup: */
    369     setStatusBar(new QIStatusBar(this));
    370     QWidget *pIndicatorBox = new QWidget;
    371     QHBoxLayout *pIndicatorBoxHLayout = new QHBoxLayout(pIndicatorBox);
    372     VBoxGlobal::setLayoutMargin(pIndicatorBoxHLayout, 0);
    373     pIndicatorBoxHLayout->setSpacing(5);
    374 
    375     /* Hard Disks: */
    376     pIndicatorBoxHLayout->addWidget(indicatorsPool()->indicator(UIIndicatorIndex_HardDisks));
    377 
    378     /* Optical Disks: */
    379     QIStateIndicator *pLedOpticalDisks = indicatorsPool()->indicator(UIIndicatorIndex_OpticalDisks);
    380     pIndicatorBoxHLayout->addWidget(pLedOpticalDisks);
    381     connect(pLedOpticalDisks, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)),
    382             this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*)));
    383 
    384     /* USB Devices: */
    385     QIStateIndicator *pLedUSBDevices = indicatorsPool()->indicator(UIIndicatorIndex_USBDevices);
    386     pIndicatorBoxHLayout->addWidget(pLedUSBDevices);
    387     connect(pLedUSBDevices, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)),
    388             this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*)));
    389 
    390     /* Network Adapters: */
    391     QIStateIndicator *pLedNetworkAdapters = indicatorsPool()->indicator(UIIndicatorIndex_NetworkAdapters);
    392     pIndicatorBoxHLayout->addWidget(pLedNetworkAdapters);
    393     connect(pLedNetworkAdapters, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)),
    394             this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*)));
    395 
    396     /* Shared Folders: */
    397     QIStateIndicator *pLedSharedFolders = indicatorsPool()->indicator(UIIndicatorIndex_SharedFolders);
    398     pIndicatorBoxHLayout->addWidget(pLedSharedFolders);
    399     connect(pLedSharedFolders, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)),
    400             this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*)));
    401 
    402     /* Virtualization: */
    403     pIndicatorBoxHLayout->addWidget(indicatorsPool()->indicator(UIIndicatorIndex_Virtualization));
    404 
    405     /* Separator: */
    406     QFrame *pSeparator = new QFrame;
    407     pSeparator->setFrameStyle(QFrame::VLine | QFrame::Sunken);
    408     pIndicatorBoxHLayout->addWidget(pSeparator);
    409 
    410     /* Mouse: */
    411     QIStateIndicator *pLedMouse = indicatorsPool()->indicator(UIIndicatorIndex_Mouse);
    412     pIndicatorBoxHLayout->addWidget(pLedMouse);
    413     connect(pLedMouse, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)),
    414             this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*)));
    415 
    416     /* Host Key: */
    417     m_pCntHostkey = new QWidget;
    418     QHBoxLayout *pHostkeyLedContainerLayout = new QHBoxLayout(m_pCntHostkey);
    419     VBoxGlobal::setLayoutMargin(pHostkeyLedContainerLayout, 0);
    420     pHostkeyLedContainerLayout->setSpacing(3);
    421     pIndicatorBoxHLayout->addWidget(m_pCntHostkey);
    422     pHostkeyLedContainerLayout->addWidget(indicatorsPool()->indicator(UIIndicatorIndex_Hostkey));
    423     m_pNameHostkey = new QLabel(QIHotKeyEdit::keyName(vboxGlobal().settings().hostKey()));
    424     pHostkeyLedContainerLayout->addWidget(m_pNameHostkey);
    425 
    426     /* Add to statusbar: */
    427     statusBar()->addPermanentWidget(pIndicatorBox, 0);
    428 
    429     /* Create & start timer to update LEDs: */
    430     m_pIdleTimer = new QTimer(this);
    431     connect(m_pIdleTimer, SIGNAL(timeout()), this, SLOT(sltUpdateIndicators()));
    432     m_pIdleTimer->start(50);
    433 
    434 #ifdef Q_WS_MAC
    435     /* For the status bar on Cocoa: */
    436     setUnifiedTitleAndToolBarOnMac(true);
    437 #endif
    438 }
    439 
    440 void UIMachineWindowNormal::prepareConnections()
     272void UIMachineWindowFullscreen::prepareConnections()
    441273{
    442274    /* Setup global settings change updater: */
     
    445277}
    446278
    447 void UIMachineWindowNormal::prepareMachineView()
     279void UIMachineWindowFullscreen::prepareMachineView()
    448280{
    449281    CMachine machine = session().GetMachine();
     
    453285    bool bAccelerate2DVideo = machine.GetAccelerate2DVideoEnabled() && VBoxGlobal::isAcceleration2DVideoAvailable();
    454286#endif
     287
     288    /* Set central widget: */
     289    setCentralWidget(new QWidget(this));
     290
     291    /* Set central widget layout: */
     292    centralWidget()->setLayout(m_pMachineViewContainer);
    455293
    456294    m_pMachineView = UIMachineView::create(  this
     
    461299                                           , machineLogic()->visualStateType());
    462300
    463     setCentralWidget(m_pMachineView);
    464 
    465     /* Setup machine view connections: */
    466     if (machineView())
    467     {
    468         /* Keyboard state-change updater: */
    469         connect(machineView(), SIGNAL(keyboardStateChanged(int)), indicatorsPool()->indicator(UIIndicatorIndex_Hostkey), SLOT(setState(int)));
    470 
    471         /* Mouse state-change updater: */
    472         connect(machineView(), SIGNAL(mouseStateChanged(int)), indicatorsPool()->indicator(UIIndicatorIndex_Mouse), SLOT(setState(int)));
    473 
    474         /* Early initialize required connections: */
    475         indicatorsPool()->indicator(UIIndicatorIndex_Hostkey)->setState(machineView()->keyboardState());
    476         indicatorsPool()->indicator(UIIndicatorIndex_Mouse)->setState(machineView()->mouseState());
    477     }
    478 }
    479 
    480 void UIMachineWindowNormal::loadWindowSettings()
     301    /* Add machine view into layout: */
     302    m_pMachineViewContainer->addWidget(m_pMachineView, 1, 1, Qt::AlignVCenter | Qt::AlignHCenter);
     303}
     304
     305void UIMachineWindowFullscreen::loadWindowSettings()
    481306{
    482307    /* Load normal window settings: */
    483308    CMachine machine = session().GetMachine();
    484309
    485     /* Load extra-data settings: */
    486     {
    487         QString strPositionSettings = machine.GetExtraData(VBoxDefs::GUI_LastWindowPosition);
    488 
    489         bool ok = false, max = false;
    490         int x = 0, y = 0, w = 0, h = 0;
    491         x = strPositionSettings.section(',', 0, 0).toInt(&ok);
    492         if (ok)
    493             y = strPositionSettings.section(',', 1, 1).toInt(&ok);
    494         if (ok)
    495             w = strPositionSettings.section(',', 2, 2).toInt(&ok);
    496         if (ok)
    497             h = strPositionSettings.section(',', 3, 3).toInt(&ok);
    498         if (ok)
    499             max = strPositionSettings.section(',', 4, 4) == VBoxDefs::GUI_LastWindowPosition_Max;
    500 
    501         QRect ar = ok ? QApplication::desktop()->availableGeometry(QPoint(x, y)) :
    502                         QApplication::desktop()->availableGeometry(machineWindow());
    503 
    504         if (ok /* if previous parameters were read correctly */)
     310    /* Toggle console to manual resize mode. */
     311    m_pMachineView->setMachineWindowResizeIgnored(true);
     312    m_pMachineView->setFrameBufferResizeIgnored(true);
     313
     314    /* The background has to go black */
     315    QPalette palette(centralWidget()->palette());
     316    palette.setColor(centralWidget()->backgroundRole(), Qt::black);
     317    centralWidget()->setPalette (palette);
     318    centralWidget()->setAutoFillBackground (true);
     319    setAutoFillBackground (true);
     320
     321    /* We have to show the window early, or the position will be wrong on the
     322       Mac */
     323    show();
     324
     325#ifdef Q_WS_MAC
     326# ifndef QT_MAC_USE_COCOA
     327    /* setWindowState removes the window group connection somehow. So save it
     328     * temporary. */
     329    WindowGroupRef g = GetWindowGroup(::darwinToNativeWindow(this));
     330# endif  /* !QT_MAC_USE_COCOA */
     331    /* Here we are going really fullscreen */
     332    setWindowState(windowState() ^ Qt::WindowFullScreen);
     333    setPresentationModeEnabled(true);
     334
     335# ifndef QT_MAC_USE_COCOA
     336    /* Reassign the correct window group. */
     337    SetWindowGroup(::darwinToNativeWindow (this), g);
     338# endif /* !QT_MAC_USE_COCOA */
     339#else /* Q_WS_MAC */
     340    setWindowState(windowState() ^ Qt::WindowFullScreen);
     341#endif/* !Q_WS_MAC */
     342
     343    QRect r = geometry();
     344    /* Load global settings: */
     345    {
     346//        VBoxGlobalSettings settings = vboxGlobal().settings();
     347//        menuBar()->setHidden(settings.isFeatureActive("noMenuBar"));
     348    }
     349}
     350
     351void UIMachineWindowFullscreen::saveWindowSettings()
     352{
     353    CMachine machine = session().GetMachine();
     354
     355    /* Save extra-data settings: */
     356    {
     357    }
     358
     359    setPresentationModeEnabled(false);
     360}
     361
     362void UIMachineWindowFullscreen::cleanupMachineView()
     363{
     364    /* Do not cleanup machine view if it is not present: */
     365    if (!machineView())
     366        return;
     367
     368    UIMachineView::destroy(m_pMachineView);
     369    m_pMachineView = 0;
     370}
     371
     372#ifdef Q_WS_MAC
     373# ifdef QT_MAC_USE_COCOA
     374void UIMachineWindowFullscreen::setPresentationModeEnabled(bool fEnabled)
     375{
     376    if (fEnabled)
     377    {
     378        /* First check if we are on the primary screen, only than the presentation mode have to be changed. */
     379        QDesktopWidget* pDesktop = QApplication::desktop();
     380        if (pDesktop->screenNumber(this) == pDesktop->primaryScreen())
    505381        {
    506             m_normalGeometry = QRect(x, y, w, h);
    507             setGeometry(m_normalGeometry);
    508 
    509             /* Normalize view to the optimal size */
    510             if (machineView())
    511                 machineView()->normalizeGeometry(true /* adjust position? */);
    512 
    513             /* Maximize if needed: */
    514             if (max)
    515                 setWindowState(windowState() | Qt::WindowMaximized);
     382            QString testStr = vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_PresentationModeEnabled).toLower();
     383            /* Default to false if it is an empty value */
     384            if (testStr.isEmpty() || testStr == "false")
     385                SetSystemUIMode(kUIModeAllHidden, 0);
     386            else
     387                SetSystemUIMode(kUIModeAllSuppressed, 0);
    516388        }
    517         else
    518         {
    519             /* Normalize to the optimal size */
    520             if (machineView())
    521                 machineView()->normalizeGeometry(true /* adjust position? */);
    522 
    523             /* Move newly created window to the screen center: */
    524             m_normalGeometry = geometry();
    525             m_normalGeometry.moveCenter(ar.center());
    526             setGeometry(m_normalGeometry);
    527         }
    528     }
    529 
    530     /* Load availability settings: */
    531     {
    532         /* USB Stuff: */
    533         CUSBController usbController = machine.GetUSBController();
    534         if (usbController.isNull())
    535         {
    536             /* Hide USB Menu: */
    537             indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)->setHidden(true);
    538         }
    539         else
    540         {
    541             /* Toggle USB LED: */
    542             indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)->setState(
    543                 usbController.GetEnabled() ? KDeviceActivity_Idle : KDeviceActivity_Null);
    544         }
    545     }
    546 
    547     /* Load global settings: */
    548     {
    549         VBoxGlobalSettings settings = vboxGlobal().settings();
    550         menuBar()->setHidden(settings.isFeatureActive("noMenuBar"));
    551         statusBar()->setHidden(settings.isFeatureActive("noStatusBar"));
    552     }
    553 }
    554 
    555 void UIMachineWindowNormal::saveWindowSettings()
    556 {
    557     CMachine machine = session().GetMachine();
    558 
    559     /* Save extra-data settings: */
    560     {
    561         QString strWindowPosition = QString("%1,%2,%3,%4")
    562                                     .arg(m_normalGeometry.x()).arg(m_normalGeometry.y())
    563                                     .arg(m_normalGeometry.width()).arg(m_normalGeometry.height());
    564         if (isMaximized())
    565             strWindowPosition += QString(",%1").arg(VBoxDefs::GUI_LastWindowPosition_Max);
    566         machine.SetExtraData(VBoxDefs::GUI_LastWindowPosition, strWindowPosition);
    567     }
    568 }
    569 
    570 void UIMachineWindowNormal::cleanupStatusBar()
    571 {
    572     /* Stop LED-update timer: */
    573     m_pIdleTimer->stop();
    574     m_pIdleTimer->disconnect(SIGNAL(timeout()), this, SLOT(sltUpdateIndicators()));
    575 }
    576 
     389    }
     390    else
     391        SetSystemUIMode(kUIModeNormal, 0);
     392}
     393# endif /* QT_MAC_USE_COCOA */
     394#endif /* Q_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h

    r26849 r26889  
    22 *
    33 * VBox frontends: Qt GUI ("VirtualBox"):
    4  * UIMachineWindowNormal class declaration
     4 * UIMachineWindowFullscreen class declaration
    55 */
    66
     
    2121 */
    2222
    23 #ifndef __UIMachineWindowNormal_h__
    24 #define __UIMachineWindowNormal_h__
     23#ifndef __UIMachineWindowFullscreen_h__
     24#define __UIMachineWindowFullscreen_h__
    2525
    2626/* Global includes */
     
    3838/* Local forwards */
    3939class CMediumAttachment;
    40 class UIIndicatorsPool;
    41 class QIStateIndicator;
    4240
    43 class UIMachineWindowNormal : public QIWithRetranslateUI<QIMainDialog>, public UIMachineWindow
     41class UIMachineWindowFullscreen : public QIWithRetranslateUI<QIMainDialog>, public UIMachineWindow
    4442{
    4543    Q_OBJECT;
     
    4846
    4947    /* Normal machine window constructor/destructor: */
    50     UIMachineWindowNormal(UIMachineLogic *pMachineLogic);
    51     virtual ~UIMachineWindowNormal();
     48    UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic);
     49    virtual ~UIMachineWindowFullscreen();
    5250
    5351private slots:
     
    6260
    6361    /* LED connections: */
    64     void sltUpdateIndicators();
    65     void sltShowIndicatorsContextMenu(QIStateIndicator *pIndicator, QContextMenuEvent *pEvent);
    6662    void sltProcessGlobalSettingChange(const char *aPublicName, const char *aName);
    6763
     
    8480    void closeEvent(QCloseEvent *pEvent);
    8581
    86     /* Private getters: */
    87     UIIndicatorsPool* indicatorsPool() { return m_pIndicatorsPool; }
    88 
    8982    /* Prepare helpers: */
    9083    void prepareConsoleConnections();
    9184    void prepareMenu();
    92     void prepareStatusBar();
    9385    void prepareConnections();
     86    void prepareMachineView();
    9487    void loadWindowSettings();
    95     void prepareMachineView();
    9688
    9789    /* Cleanup helpers: */
    98     //void cleanupMachineView() {}
    9990    void saveWindowSettings();
     91    void cleanupMachineView();
    10092    //void cleanupConnections() {}
    101     void cleanupStatusBar();
    10293    //void cleanupMenu() {}
    10394    //void cleanupConsoleConnections() {}
    10495
    105     /* Indicators pool: */
    106     UIIndicatorsPool *m_pIndicatorsPool;
    107     /* Other QWidgets: */
    108     QWidget *m_pCntHostkey;
    109     QLabel *m_pNameHostkey;
    110     /* Other QObjects: */
    111     QTimer *m_pIdleTimer;
     96#ifdef Q_WS_MAC
     97# ifdef QT_MAC_USE_COCOA
     98    void setPresentationModeEnabled(bool fEnabled);
     99# endif /* QT_MAC_USE_COCOA */
     100#endif /* Q_WS_MAC */
     101
    112102    /* Other members: */
    113103    QRect m_normalGeometry;
     
    117107};
    118108
    119 #endif // __UIMachineWindowNormal_h__
     109#endif // __UIMachineWindowFullscreen_h__
    120110
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r26878 r26889  
    5050#endif
    5151                   )
    52     , m_desktopGeometryType(DesktopGeo_Invalid)
    5352    , m_bIsGuestAutoresizeEnabled(pMachineWindow->machineLogic()->actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize)->isChecked())
    5453    , m_fShouldWeDoResize(false)
     
    165164    /* Global settings: */
    166165    {
    167         /* Remember the desktop geometry and register for geometry
    168          * change events for telling the guest about video modes we like: */
    169         QString desktopGeometry = vboxGlobal().settings().publicProperty("GUI/MaxGuestResolution");
    170         if ((desktopGeometry == QString::null) || (desktopGeometry == "auto"))
    171             setDesktopGeometry(DesktopGeo_Automatic, 0, 0);
    172         else if (desktopGeometry == "any")
    173             setDesktopGeometry(DesktopGeo_Any, 0, 0);
    174         else
    175         {
    176             int width = desktopGeometry.section(',', 0, 0).toInt();
    177             int height = desktopGeometry.section(',', 1, 1).toInt();
    178             setDesktopGeometry(DesktopGeo_Fixed, width, height);
    179         }
    180166        connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltDesktopResized()));
    181167    }
     
    193179            sltPerformGuestResize();
    194180    }
    195 }
    196 
    197 QSize UIMachineViewNormal::desktopGeometry() const
    198 {
    199     QSize geometry;
    200     switch (m_desktopGeometryType)
    201     {
    202         case DesktopGeo_Fixed:
    203         case DesktopGeo_Automatic:
    204             geometry = QSize(qMax(m_desktopGeometry.width(), m_storedConsoleSize.width()),
    205                              qMax(m_desktopGeometry.height(), m_storedConsoleSize.height()));
    206             break;
    207         case DesktopGeo_Any:
    208             geometry = QSize(0, 0);
    209             break;
    210         default:
    211             AssertMsgFailed(("Bad geometry type %d!\n", m_desktopGeometryType));
    212     }
    213     return geometry;
    214181}
    215182
     
    262229}
    263230
    264 void UIMachineViewNormal::calculateDesktopGeometry()
    265 {
    266     /* This method should not get called until we have initially set up the m_desktopGeometryType: */
    267     Assert((m_desktopGeometryType != DesktopGeo_Invalid));
    268     /* If we are not doing automatic geometry calculation then there is nothing to do: */
    269     if (DesktopGeo_Automatic == m_desktopGeometryType)
    270     {
    271         /* Available geometry of the desktop.  If the desktop is a single
    272          * screen, this will exclude space taken up by desktop taskbars
    273          * and things, but this is unfortunately not true for the more
    274          * complex case of a desktop spanning multiple screens: */
    275         QRect desktop = availableGeometry();
    276         /* The area taken up by the machine window on the desktop,
    277          * including window frame, title and menu bar and whatnot: */
    278         QRect frame = machineWindowWrapper()->machineWindow()->frameGeometry();
    279         /* The area taken up by the machine view, so excluding all decorations: */
    280         QRect window = geometry();
    281         /* To work out how big we can make the console window while still
    282          * fitting on the desktop, we calculate desktop - frame + window.
    283          * This works because the difference between frame and window
    284          * (or at least its width and height) is a constant. */
    285         m_desktopGeometry = QSize(desktop.width() - frame.width() + window.width(),
    286                                   desktop.height() - frame.height() + window.height());
    287     }
    288 }
    289 
    290231QRect UIMachineViewNormal::availableGeometry()
    291232{
    292     return machineWindowWrapper()->machineWindow()->isFullScreen() ?
    293            QApplication::desktop()->screenGeometry(this) :
    294            QApplication::desktop()->availableGeometry(this);
    295 }
    296 
    297 void UIMachineViewNormal::setDesktopGeometry(DesktopGeo geometry, int aWidth, int aHeight)
    298 {
    299     switch (geometry)
    300     {
    301         case DesktopGeo_Fixed:
    302             m_desktopGeometryType = DesktopGeo_Fixed;
    303             if (aWidth != 0 && aHeight != 0)
    304                 m_desktopGeometry = QSize(aWidth, aHeight);
    305             else
    306                 m_desktopGeometry = QSize(0, 0);
    307             storeConsoleSize(0, 0);
    308             break;
    309         case DesktopGeo_Automatic:
    310             m_desktopGeometryType = DesktopGeo_Automatic;
    311             m_desktopGeometry = QSize(0, 0);
    312             storeConsoleSize(0, 0);
    313             break;
    314         case DesktopGeo_Any:
    315             m_desktopGeometryType = DesktopGeo_Any;
    316             m_desktopGeometry = QSize(0, 0);
    317             break;
    318         default:
    319             AssertMsgFailed(("Invalid desktop geometry type %d\n", geometry));
    320             m_desktopGeometryType = DesktopGeo_Invalid;
    321     }
    322 }
    323 
    324 void UIMachineViewNormal::storeConsoleSize(int iWidth, int iHeight)
    325 {
    326     m_storedConsoleSize = QSize(iWidth, iHeight);
     233    return QApplication::desktop()->availableGeometry(this);
    327234}
    328235
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h

    r26878 r26889  
    3838protected:
    3939
    40     /* Desktop geometry types: */
    41     enum DesktopGeo { DesktopGeo_Invalid = 0, DesktopGeo_Fixed, DesktopGeo_Automatic, DesktopGeo_Any };
    42 
    4340    /* Normal machine view constructor/destructor: */
    4441    UIMachineViewNormal(  UIMachineWindow *pMachineWindow
     
    7673    void setGuestAutoresizeEnabled(bool bEnabled);
    7774
    78     /* Hidden getters: */
    79     QSize desktopGeometry() const;
    80 
    8175    /* Private helpers: */
    8276    void normalizeGeometry(bool fAdjustPosition);
    83     void calculateDesktopGeometry();
    8477    QRect availableGeometry();
    85     void setDesktopGeometry(DesktopGeo geometry, int iWidth, int iHeight);
    86     void storeConsoleSize(int iWidth, int iHeight);
    8778    void maybeRestrictMinimumSize();
    8879
     
    9283
    9384    /* Private members: */
    94     DesktopGeo m_desktopGeometryType;
    95     QSize m_desktopGeometry;
    96     QSize m_storedConsoleSize;
    9785    bool m_bIsGuestAutoresizeEnabled : 1;
    9886    bool m_fShouldWeDoResize : 1;
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