VirtualBox

Ignore:
Timestamp:
Feb 1, 2023 3:01:38 PM (2 years ago)
Author:
vboxsync
Message:

Merging r155443 from gui4 branch: FE/Qt: Runtime UI: Move rest of close related stuff from UISession to UIMachine; Really dangerous stuff, can cause crashes or misbehavior on various kinds of VM shutdown.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:mergeinfo
      •  

        old new  
        1919/branches/dsen/gui2:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        2020/branches/dsen/gui3:79645-79692
        21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441
         21/branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443
        2222/trunk/src:92342,154921
  • trunk/src/VBox

    • Property svn:mergeinfo
      •  

        old new  
        1919/branches/dsen/gui2/src/VBox:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        2020/branches/dsen/gui3/src/VBox:79645-79692
        21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441
         21/branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443
  • trunk/src/VBox/Frontends

    • Property svn:mergeinfo
      •  

        old new  
        1616/branches/dsen/gui2/src/VBox/Frontends:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        1717/branches/dsen/gui3/src/VBox/Frontends:79645-79692
        18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441
         18/branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r98402 r98404  
    4646#include "UIMachineWindow.h"
    4747#include "UIMessageCenter.h"
     48#include "UINotificationCenter.h"
    4849#ifdef VBOX_WS_MAC
    4950# include "UICocoaApplication.h"
     
    362363}
    363364
     365void UIMachine::detachUi()
     366{
     367    /* Manually close Runtime UI: */
     368    LogRel(("GUI: Detaching UI..\n"));
     369    closeRuntimeUI();
     370}
     371
     372void UIMachine::saveState()
     373{
     374    /* Prepare VM to be saved: */
     375    if (!uisession()->prepareToBeSaved())
     376        return;
     377
     378    /* Enable 'manual-override',
     379     * preventing automatic Runtime UI closing: */
     380    setManualOverrideMode(true);
     381
     382    /* Now, do the magic: */
     383    LogRel(("GUI: Saving VM state..\n"));
     384    UINotificationProgressMachineSaveState *pNotification =
     385        new UINotificationProgressMachineSaveState(uisession()->machine());
     386    connect(pNotification, &UINotificationProgressMachineSaveState::sigMachineStateSaved,
     387            this, &UIMachine::sltHandleMachineStateSaved);
     388    gpNotificationCenter->append(pNotification);
     389}
     390
     391void UIMachine::shutdown()
     392{
     393    /* Prepare VM to be shutdowned: */
     394    if (!uisession()->prepareToBeShutdowned())
     395        return;
     396
     397    /* Now, do the magic: */
     398    LogRel(("GUI: Sending ACPI shutdown signal..\n"));
     399    CConsole comConsole = uisession()->console();
     400    comConsole.PowerButton();
     401    if (!comConsole.isOk())
     402        UINotificationMessage::cannotACPIShutdownMachine(uisession()->console());
     403}
     404
     405void UIMachine::powerOff(bool fIncludingDiscard)
     406{
     407    /* Enable 'manual-override',
     408     * preventing automatic Runtime UI closing: */
     409    setManualOverrideMode(true);
     410
     411    /* Now, do the magic: */
     412    LogRel(("GUI: Powering VM off..\n"));
     413    UINotificationProgressMachinePowerOff *pNotification =
     414        new UINotificationProgressMachinePowerOff(uisession()->machine(),
     415                                                  uisession()->console(),
     416                                                  fIncludingDiscard);
     417    connect(pNotification, &UINotificationProgressMachinePowerOff::sigMachinePoweredOff,
     418            this, &UIMachine::sltHandleMachinePoweredOff);
     419    gpNotificationCenter->append(pNotification);
     420}
     421
    364422void UIMachine::closeRuntimeUI()
    365423{
    366     /* Quit application: */
    367     QApplication::quit();
     424    /* First, we have to hide any opened modal/popup widgets.
     425     * They then should unlock their event-loops asynchronously.
     426     * If all such loops are unlocked, we can close Runtime UI. */
     427    QWidget *pWidget = QApplication::activeModalWidget()
     428                     ? QApplication::activeModalWidget()
     429                     : QApplication::activePopupWidget()
     430                     ? QApplication::activePopupWidget()
     431                     : 0;
     432    if (pWidget)
     433    {
     434        /* First we should try to close this widget: */
     435        pWidget->close();
     436        /* If widget rejected the 'close-event' we can
     437         * still hide it and hope it will behave correctly
     438         * and unlock his event-loop if any: */
     439        if (!pWidget->isHidden())
     440            pWidget->hide();
     441        /* Asynchronously restart this slot: */
     442        QMetaObject::invokeMethod(this, "closeRuntimeUI", Qt::QueuedConnection);
     443        return;
     444    }
     445
     446    /* Asynchronously ask QApplication to quit: */
     447    LogRel(("GUI: Request for async QApp quit.\n"));
     448    QMetaObject::invokeMethod(qApp, "quit", Qt::QueuedConnection);
    368449}
    369450
     
    675756        emit sigCursorPositionChange();
    676757    }
     758}
     759
     760void UIMachine::sltHandleMachineStateSaved(bool fSuccess)
     761{
     762    /* Disable 'manual-override' finally: */
     763    setManualOverrideMode(false);
     764
     765    /* Close Runtime UI if state was saved: */
     766    if (fSuccess)
     767        closeRuntimeUI();
     768}
     769
     770void UIMachine::sltHandleMachinePoweredOff(bool fSuccess, bool fIncludingDiscard)
     771{
     772    /* Disable 'manual-override' finally: */
     773    setManualOverrideMode(false);
     774
     775    /* Do we have other tasks? */
     776    if (fSuccess)
     777    {
     778        if (fIncludingDiscard)
     779        {
     780            /* Now, do more magic! */
     781            UINotificationProgressSnapshotRestore *pNotification =
     782                new UINotificationProgressSnapshotRestore(uiCommon().managedVMUuid());
     783            connect(pNotification, &UINotificationProgressSnapshotRestore::sigSnapshotRestored,
     784                    this, &UIMachine::sltHandleSnapshotRestored);
     785            gpNotificationCenter->append(pNotification);
     786        }
     787        else
     788            closeRuntimeUI();
     789    }
     790}
     791
     792void UIMachine::sltHandleSnapshotRestored(bool)
     793{
     794    /* Close Runtime UI independent of snapshot restoring state: */
     795    closeRuntimeUI();
    677796}
    678797
     
    711830    , m_fIsMouseIntegrated(true)
    712831    , m_iMouseState(0)
     832    , m_fIsManualOverride(false)
    713833    , m_defaultCloseAction(MachineCloseAction_Invalid)
    714834    , m_restrictedCloseActions(MachineCloseAction_Invalid)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h

    r98402 r98404  
    298298    /** @name Close stuff.
    299299     * @{ */
     300        /** Returns whether VM is in 'manual-override' mode.
     301          * @note S.a. #m_fIsManualOverride description for more information. */
     302        bool isManualOverrideMode() const { return m_fIsManualOverride; }
     303        /** Defines whether VM is in 'manual-override' mode.
     304          * @note S.a. #m_fIsManualOverride description for more information. */
     305        void setManualOverrideMode(bool fIsManualOverride) { m_fIsManualOverride = fIsManualOverride; }
     306
    300307        /** Returns default close action. */
    301308        MachineCloseAction defaultCloseAction() const { return m_defaultCloseAction; }
    302309        /** Returns merged restricted close actions. */
    303310        MachineCloseAction restrictedCloseActions() const { return m_restrictedCloseActions; }
     311
     312        /** Detaches and closes Runtime UI. */
     313        void detachUi();
     314        /** Saves VM state, then closes Runtime UI. */
     315        void saveState();
     316        /** Calls for guest shutdown to close Runtime UI. */
     317        void shutdown();
     318        /** Powers VM off, then closes Runtime UI. */
     319        void powerOff(bool fIncludingDiscard);
    304320    /** @} */
    305321
     
    414430    /** @} */
    415431
     432    /** @name Close stuff.
     433     * @{ */
     434        /** Handles signal about machine state saved.
     435          * @param  fSuccess  Brings whether state was saved successfully. */
     436        void sltHandleMachineStateSaved(bool fSuccess);
     437        /** Handles signal about machine powered off.
     438          * @param  fSuccess           Brings whether machine was powered off successfully.
     439          * @param  fIncludingDiscard  Brings whether machine state should be discarded. */
     440        void sltHandleMachinePoweredOff(bool fSuccess, bool fIncludingDiscard);
     441        /** Handles signal about snapshot restored.
     442          * @param  fSuccess  Brings whether machine was powered off successfully. */
     443        void sltHandleSnapshotRestored(bool fSuccess);
     444    /** @} */
     445
    416446private:
    417447
     
    629659    /** @name Close stuff.
    630660     * @{ */
     661        /** Holds whether VM is in 'manual-override' mode
     662          * which means there will be no automatic UI shutdowns,
     663          * visual representation mode changes and other stuff. */
     664        bool  m_fIsManualOverride : 1;
     665
    631666        /** Default close action. */
    632667        MachineCloseAction  m_defaultCloseAction;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r98403 r98404  
    417417    /* Power VM off: */
    418418    LogRel(("GUI: Request to power VM off due to VBoxSVC is unavailable.\n"));
    419     uisession()->powerOff(false /* do NOT restore current snapshot */);
     419    uimachine()->powerOff(false /* do NOT restore current snapshot */);
    420420}
    421421
     
    473473                    {
    474474                        LogRel(("GUI: User requested to power VM off on Guru Meditation.\n"));
    475                         uisession()->powerOff(false /* do NOT restore current snapshot */);
     475                        uimachine()->powerOff(false /* do NOT restore current snapshot */);
    476476                    }
    477477                    break;
     
    481481                {
    482482                    LogRel(("GUI: Automatic request to power VM off on Guru Meditation.\n"));
    483                     uisession()->powerOff(false /* do NOT restore current snapshot */);
     483                    uimachine()->powerOff(false /* do NOT restore current snapshot */);
    484484                    break;
    485485                }
     
    525525        {
    526526            /* If not in 'manual-override' mode: */
    527             if (!uisession()->isManualOverrideMode())
     527            if (!uimachine()->isManualOverrideMode())
    528528            {
    529529                /* VM has been powered off, saved, teleported or aborted.
     
    549549
    550550                LogRel(("GUI: Request to close Runtime UI because VM is powered off already.\n"));
    551                 uisession()->closeRuntimeUI();
     551                uimachine()->closeRuntimeUI();
    552552                return;
    553553            }
     
    997997    /* 'Application' actions connection: */
    998998    connect(actionPool()->action(UIActionIndex_M_Application_S_Preferences), &UIAction::triggered,
    999             this, &UIMachineLogic::sltOpenPreferencesDialogDefault, Qt::UniqueConnection);
     999            this, &UIMachineLogic::sltOpenPreferencesDialogDefault);
    10001000    connect(actionPool()->action(UIActionIndex_M_Application_S_Close), &UIAction::triggered,
    1001             this, &UIMachineLogic::sltClose, Qt::QueuedConnection);
     1001            this, &UIMachineLogic::sltClose);
    10021002
    10031003    /* 'Machine' actions connections: */
     
    15351535        return;
    15361536    /* Do not close machine-window in 'manual-override' mode: */
    1537     if (uisession()->isManualOverrideMode())
     1537    if (uimachine()->isManualOverrideMode())
    15381538        return;
    15391539
     
    17551755
    17561756    LogRel(("GUI: User requested to detach GUI.\n"));
    1757     uisession()->detachUi();
     1757    uimachine()->detachUi();
    17581758}
    17591759
     
    17681768
    17691769    LogRel(("GUI: User requested to save VM state.\n"));
    1770     uisession()->saveState();
     1770    uimachine()->saveState();
    17711771}
    17721772
     
    17811781
    17821782    LogRel(("GUI: User requested to shutdown VM.\n"));
    1783     uisession()->shutdown();
     1783    uimachine()->shutdown();
    17841784}
    17851785
     
    17951795    LogRel(("GUI: User requested to power VM off.\n"));
    17961796    const bool fDiscardStateOnPowerOff = gEDataManager->discardStateOnPowerOff(uiCommon().managedVMUuid());
    1797     uisession()->powerOff(machine().GetSnapshotCount() > 0 && fDiscardStateOnPowerOff);
     1797    uimachine()->powerOff(machine().GetSnapshotCount() > 0 && fDiscardStateOnPowerOff);
    17981798}
    17991799
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r98401 r98404  
    516516            /* Detach GUI: */
    517517            LogRel(("GUI: Request for close-action to detach GUI.\n"));
    518             uisession()->detachUi();
     518            uimachine()->detachUi();
    519519            break;
    520520        }
     
    523523            /* Save VM state: */
    524524            LogRel(("GUI: Request for close-action to save VM state.\n"));
    525             uisession()->saveState();
     525            uimachine()->saveState();
    526526            break;
    527527        }
     
    530530            /* Shutdown VM: */
    531531            LogRel(("GUI: Request for close-action to shutdown VM.\n"));
    532             uisession()->shutdown();
     532            uimachine()->shutdown();
    533533            break;
    534534        }
     
    538538            LogRel(("GUI: Request for close-action to power VM off.\n"));
    539539            const bool fDiscardStateOnPowerOff = gEDataManager->discardStateOnPowerOff(uiCommon().managedVMUuid());
    540             uisession()->powerOff(machine().GetSnapshotCount() > 0 && fDiscardStateOnPowerOff);
     540            uimachine()->powerOff(machine().GetSnapshotCount() > 0 && fDiscardStateOnPowerOff);
    541541            break;
    542542        }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r98402 r98404  
    211211     * preventing automatic Runtime UI closing
    212212     * and visual representation mode changes: */
    213     setManualOverrideMode(true);
     213    uimachine()->setManualOverrideMode(true);
    214214
    215215    /* Show "Starting/Restoring" progress dialog: */
     
    241241
    242242    /* Disable 'manual-override' finally: */
    243     setManualOverrideMode(false);
     243    uimachine()->setManualOverrideMode(false);
    244244
    245245    /* True by default: */
    246246    return true;
    247 }
    248 
    249 void UISession::detachUi()
    250 {
    251     /* Manually close Runtime UI: */
    252     LogRel(("GUI: Detaching UI..\n"));
    253     closeRuntimeUI();
    254 }
    255 
    256 void UISession::saveState()
    257 {
    258     /* Prepare VM to be saved: */
    259     if (!prepareToBeSaved())
    260         return;
    261 
    262     /* Enable 'manual-override',
    263      * preventing automatic Runtime UI closing: */
    264     setManualOverrideMode(true);
    265 
    266     /* Now, do the magic: */
    267     LogRel(("GUI: Saving VM state..\n"));
    268     UINotificationProgressMachineSaveState *pNotification =
    269         new UINotificationProgressMachineSaveState(machine());
    270     connect(pNotification, &UINotificationProgressMachineSaveState::sigMachineStateSaved,
    271             this, &UISession::sltHandleMachineStateSaved);
    272     gpNotificationCenter->append(pNotification);
    273 }
    274 
    275 void UISession::shutdown()
    276 {
    277     /* Prepare VM to be shutdowned: */
    278     if (!prepareToBeShutdowned())
    279         return;
    280 
    281     /* Now, do the magic: */
    282     LogRel(("GUI: Sending ACPI shutdown signal..\n"));
    283     CConsole comConsole = console();
    284     comConsole.PowerButton();
    285     if (!comConsole.isOk())
    286         UINotificationMessage::cannotACPIShutdownMachine(console());
    287 }
    288 
    289 void UISession::powerOff(bool fIncludingDiscard)
    290 {
    291     /* Enable 'manual-override',
    292      * preventing automatic Runtime UI closing: */
    293     setManualOverrideMode(true);
    294 
    295     /* Now, do the magic: */
    296     LogRel(("GUI: Powering VM off..\n"));
    297     UINotificationProgressMachinePowerOff *pNotification =
    298         new UINotificationProgressMachinePowerOff(machine(),
    299                                                   console(),
    300                                                   fIncludingDiscard);
    301     connect(pNotification, &UINotificationProgressMachinePowerOff::sigMachinePoweredOff,
    302             this, &UISession::sltHandleMachinePoweredOff);
    303     gpNotificationCenter->append(pNotification);
    304247}
    305248
     
    404347}
    405348
    406 void UISession::closeRuntimeUI()
    407 {
    408     /* First, we have to hide any opened modal/popup widgets.
    409      * They then should unlock their event-loops asynchronously.
    410      * If all such loops are unlocked, we can close Runtime UI. */
    411     QWidget *pWidget = QApplication::activeModalWidget()
    412                      ? QApplication::activeModalWidget()
    413                      : QApplication::activePopupWidget()
    414                      ? QApplication::activePopupWidget()
    415                      : 0;
    416     if (pWidget)
    417     {
    418         /* First we should try to close this widget: */
    419         pWidget->close();
    420         /* If widget rejected the 'close-event' we can
    421          * still hide it and hope it will behave correctly
    422          * and unlock his event-loop if any: */
    423         if (!pWidget->isHidden())
    424             pWidget->hide();
    425         /* Asynchronously restart this slot: */
    426         QMetaObject::invokeMethod(this, "closeRuntimeUI", Qt::QueuedConnection);
    427         return;
    428     }
    429 
    430     /* Asynchronously ask UIMachine to close Runtime UI: */
    431     LogRel(("GUI: Passing request to close Runtime UI from UI session to UI machine.\n"));
    432     QMetaObject::invokeMethod(uimachine(), "closeRuntimeUI", Qt::QueuedConnection);
    433 }
    434 
    435349void UISession::sltDetachCOM()
    436350{
     
    454368        emit sigMachineStateChange();
    455369    }
    456 }
    457 
    458 void UISession::sltHandleMachineStateSaved(bool fSuccess)
    459 {
    460     /* Disable 'manual-override' finally: */
    461     setManualOverrideMode(false);
    462 
    463     /* Close Runtime UI if state was saved: */
    464     if (fSuccess)
    465         closeRuntimeUI();
    466 }
    467 
    468 void UISession::sltHandleMachinePoweredOff(bool fSuccess, bool fIncludingDiscard)
    469 {
    470     /* Disable 'manual-override' finally: */
    471     setManualOverrideMode(false);
    472 
    473     /* Do we have other tasks? */
    474     if (fSuccess)
    475     {
    476         if (!fIncludingDiscard)
    477             closeRuntimeUI();
    478         else
    479         {
    480             /* Now, do more magic! */
    481             UINotificationProgressSnapshotRestore *pNotification =
    482                 new UINotificationProgressSnapshotRestore(uiCommon().managedVMUuid());
    483             connect(pNotification, &UINotificationProgressSnapshotRestore::sigSnapshotRestored,
    484                     this, &UISession::sltHandleSnapshotRestored);
    485             gpNotificationCenter->append(pNotification);
    486         }
    487     }
    488 }
    489 
    490 void UISession::sltHandleSnapshotRestored(bool)
    491 {
    492     /* Close Runtime UI independent of snapshot restoring state: */
    493     closeRuntimeUI();
    494370}
    495371
     
    537413    , m_fIsGuestResizeIgnored(false)
    538414    , m_fIsAutoCaptureDisabled(false)
    539     , m_fIsManualOverride(false)
    540415    /* Guest additions flags: */
    541416    , m_ulGuestAdditionsRunLevel(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r98402 r98404  
    148148    /** Powers VM up. */
    149149    bool powerUp();
    150     /** Detaches and closes Runtime UI. */
    151     void detachUi();
    152     /** Saves VM state, then closes Runtime UI. */
    153     void saveState();
    154     /** Calls for guest shutdown to close Runtime UI. */
    155     void shutdown();
    156     /** Powers VM off, then closes Runtime UI. */
    157     void powerOff(bool fIncludingDiscard);
    158150
    159151    /** Returns the session instance. */
     
    212204    bool isAutoCaptureDisabled() const { return m_fIsAutoCaptureDisabled; }
    213205
    214     /** Returns whether VM is in 'manual-override' mode.
    215       * @note S.a. #m_fIsManualOverride description for more information. */
    216     bool isManualOverrideMode() const { return m_fIsManualOverride; }
    217     /** Defines whether VM is in 'manual-override' mode.
    218       * @note S.a. #m_fIsManualOverride description for more information. */
    219     void setManualOverrideMode(bool fIsManualOverride) { m_fIsManualOverride = fIsManualOverride; }
    220 
    221206    /* Guest additions state getters: */
    222207    bool isGuestAdditionsActive() const { return (m_ulGuestAdditionsRunLevel > KAdditionsRunLevelType_None); }
     
    280265    void sltMountDVDAdHoc(const QString &strSource);
    281266
    282     /** Closes Runtime UI. */
    283     void closeRuntimeUI();
    284 
    285267private slots:
    286268
     
    291273    void sltStateChange(KMachineState state);
    292274    void sltAdditionsChange();
    293 
    294     /** Handles signal about machine state saved.
    295       * @param  fSuccess  Brings whether state was saved successfully. */
    296     void sltHandleMachineStateSaved(bool fSuccess);
    297     /** Handles signal about machine powered off.
    298       * @param  fSuccess           Brings whether machine was powered off successfully.
    299       * @param  fIncludingDiscard  Brings whether machine state should be discarded. */
    300     void sltHandleMachinePoweredOff(bool fSuccess, bool fIncludingDiscard);
    301     /** Handles signal about snapshot restored.
    302       * @param  fSuccess  Brings whether machine was powered off successfully. */
    303     void sltHandleSnapshotRestored(bool fSuccess);
    304275
    305276private:
     
    372343    bool m_fIsGuestResizeIgnored : 1;
    373344    bool m_fIsAutoCaptureDisabled : 1;
    374     /** Holds whether VM is in 'manual-override' mode
    375       * which means there will be no automatic UI shutdowns,
    376       * visual representation mode changes and other stuff. */
    377     bool m_fIsManualOverride : 1;
    378345
    379346    /* Guest additions flags: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r98386 r98404  
    3030
    3131/* GUI includes: */
     32#include "QIMenu.h"
     33#include "UIActionPoolRuntime.h"
    3234#include "UICommon.h"
    3335#include "UIDesktopWidgetWatchdog.h"
     36#include "UIMachine.h"
     37#include "UIMachineLogicFullscreen.h"
     38#include "UIMachineView.h"
     39#include "UIMachineWindowFullscreen.h"
    3440#include "UIMessageCenter.h"
     41#include "UIMultiScreenLayout.h"
    3542#include "UISession.h"
    36 #include "UIActionPoolRuntime.h"
    37 #include "UIMachineLogicFullscreen.h"
    38 #include "UIMachineWindowFullscreen.h"
    39 #include "UIMultiScreenLayout.h"
    4043#include "UIShortcutPool.h"
    41 #include "UIMachineView.h"
    42 #include "QIMenu.h"
    4344#ifdef VBOX_WS_MAC
    4445# include "UICocoaApplication.h"
    4546# include "UIExtraDataManager.h"
     47# include "UIFrameBuffer.h"
    4648# include "VBoxUtils.h"
    47 # include "UIFrameBuffer.h"
    4849# include <Carbon/Carbon.h>
    4950#endif /* VBOX_WS_MAC */
     
    348349
    349350    /* Do not try to change visual-state type in 'manual override' mode: */
    350     if (uisession()->isManualOverrideMode())
     351    if (uimachine()->isManualOverrideMode())
    351352        return;
    352353
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r98375 r98404  
    3232
    3333/* GUI includes: */
     34#include "UIActionPoolRuntime.h"
    3435#include "UICommon.h"
    3536#include "UIDesktopWidgetWatchdog.h"
    36 #include "UIMessageCenter.h"
    37 #include "UISession.h"
    38 #include "UIActionPoolRuntime.h"
     37#include "UIExtraDataManager.h"
     38#include "UIFrameBuffer.h"
     39#include "UIMachine.h"
    3940#include "UIMachineLogicNormal.h"
    4041#include "UIMachineWindow.h"
    4142#include "UIMenuBarEditorWindow.h"
     43#include "UIMessageCenter.h"
     44#include "UISession.h"
    4245#include "UIStatusBarEditorWindow.h"
    43 #include "UIExtraDataManager.h"
    44 #include "UIFrameBuffer.h"
    4546#ifndef VBOX_WS_MAC
    4647# include "QIMenu.h"
    47 #else  /* VBOX_WS_MAC */
     48#else
    4849# include "VBoxUtils.h"
    49 #endif /* VBOX_WS_MAC */
     50#endif
    5051
    5152/* COM includes: */
     
    7980
    8081    /* Do not try to change visual-state type in 'manual override' mode: */
    81     if (uisession()->isManualOverrideMode())
     82    if (uimachine()->isManualOverrideMode())
    8283        return;
    8384
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp

    r98375 r98404  
    3232
    3333/* GUI includes: */
     34#include "UIActionPoolRuntime.h"
    3435#include "UICommon.h"
    3536#include "UIDesktopWidgetWatchdog.h"
     37#include "UIMachine.h"
     38#include "UIMachineLogicScale.h"
     39#include "UIMachineWindow.h"
    3640#include "UIMessageCenter.h"
    3741#include "UISession.h"
    38 #include "UIActionPoolRuntime.h"
    39 #include "UIMachineLogicScale.h"
    40 #include "UIMachineWindow.h"
    4142#include "UIShortcutPool.h"
    4243#ifndef VBOX_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp

    r98375 r98404  
    3232
    3333/* GUI includes: */
     34#include "UIActionPoolRuntime.h"
    3435#include "UICommon.h"
    35 #include "UIMessageCenter.h"
    36 #include "UISession.h"
    37 #include "UIActionPoolRuntime.h"
     36#include "UIMachine.h"
    3837#include "UIMachineLogicSeamless.h"
    3938#include "UIMachineWindowSeamless.h"
     39#include "UIMessageCenter.h"
    4040#include "UIMultiScreenLayout.h"
     41#include "UISession.h"
    4142#include "UIShortcutPool.h"
    4243#ifndef VBOX_WS_MAC
    4344# include "QIMenu.h"
    44 #else  /* VBOX_WS_MAC */
     45#else
    4546# include "VBoxUtils.h"
    46 #endif /* VBOX_WS_MAC */
     47#endif
    4748
    4849/* COM includes: */
     
    124125
    125126    /* Do not try to change visual-state type in 'manual override' mode: */
    126     if (uisession()->isManualOverrideMode())
     127    if (uimachine()->isManualOverrideMode())
    127128        return;
    128129
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