VirtualBox

Changeset 48920 in vbox for trunk


Ignore:
Timestamp:
Oct 7, 2013 1:02:45 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: 6982: Runtime UI: Multi-screen auto-pilot feature: Sleep-mode support.

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

Legend:

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

    r48832 r48920  
    8080    /* Common variables: */
    8181    , m_pMenuPool(0)
     82    , m_machineStatePrevious(KMachineState_Null)
    8283    , m_machineState(session().GetMachine().GetState())
    8384#ifdef Q_WS_WIN
     
    724725    {
    725726        /* Store new data: */
     727        m_machineStatePrevious = m_machineState;
    726728        m_machineState = state;
    727729
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r48832 r48920  
    9797    /* Common getters: */
    9898    CSession& session() { return m_session; }
     99    KMachineState machineStatePrevious() const { return m_machineStatePrevious; }
    99100    KMachineState machineState() const { return m_machineState; }
    100101    UIMachineLogic* machineLogic() const;
     
    120121                                    machineState() == KMachineState_LiveSnapshotting; }
    121122    bool isStuck() const { return machineState() == KMachineState_Stuck; }
     123    bool wasPaused() const { return machineStatePrevious() == KMachineState_Paused ||
     124                                    machineStatePrevious() == KMachineState_TeleportingPausedVM; }
    122125    bool isFirstTimeStarted() const { return m_fIsFirstTimeStarted; }
    123126    bool isIgnoreRuntimeMediumsChanging() const { return m_fIsIgnoreRuntimeMediumsChanging; }
     
    280283
    281284    /* Common variables: */
     285    KMachineState m_machineStatePrevious;
    282286    KMachineState m_machineState;
    283287    QCursor m_cursor;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r46924 r48920  
    8787{
    8888    return m_pScreenLayout->hasHostScreenForGuestScreen(iScreenId);
     89}
     90
     91void UIMachineLogicFullscreen::sltMachineStateChanged()
     92{
     93    /* Call to base-class: */
     94    UIMachineLogic::sltMachineStateChanged();
     95
     96    /* If machine-state changed from 'paused' to 'running': */
     97    if (uisession()->isRunning() && uisession()->wasPaused())
     98    {
     99        /* We should rebuild screen-layout: */
     100        m_pScreenLayout->rebuild();
     101        /* We should update machine-windows sizes: */
     102        foreach (UIMachineWindow *pMachineWindow, machineWindows())
     103            pMachineWindow->handleScreenResize();
     104    }
    89105}
    90106
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h

    r44982 r48920  
    4646private slots:
    4747
     48    /* Handler: Console callback stuff: */
     49    void sltMachineStateChanged();
     50
    4851#ifdef Q_WS_MAC
    4952    void sltChangePresentationMode(bool fEnabled);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp

    r47523 r48920  
    101101}
    102102
     103void UIMachineLogicSeamless::sltMachineStateChanged()
     104{
     105    /* Call to base-class: */
     106    UIMachineLogic::sltMachineStateChanged();
     107
     108    /* If machine-state changed from 'paused' to 'running': */
     109    if (uisession()->isRunning() && uisession()->wasPaused())
     110    {
     111        /* We should rebuild screen-layout: */
     112        m_pScreenLayout->rebuild();
     113        /* We should update machine-windows sizes: */
     114        foreach (UIMachineWindow *pMachineWindow, machineWindows())
     115            pMachineWindow->handleScreenResize();
     116    }
     117}
     118
    103119void UIMachineLogicSeamless::sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo)
    104120{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h

    r47523 r48920  
    4949private slots:
    5050
     51    /* Handler: Console callback stuff: */
     52    void sltMachineStateChanged();
     53
    5154    void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
    5255    void sltHostScreenCountChanged(int cScreenCount);
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