VirtualBox

Ignore:
Timestamp:
Feb 26, 2010 2:43:37 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: New running VM core: cumulative patch to let uimachine to restore mouse/keyboard states when switching modes.

File:
1 edited

Legend:

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

    r26773 r26815  
    2727
    2828/* Local includes */
     29#include "COMDefs.h"
    2930#include "VBoxGlobal.h"
    3031#include "VBoxProblemReporter.h"
     
    5556    prepareRequiredFeatures();
    5657
    57     /* Load common logic settings: */
    58     loadLogicSettings();
    59 
    6058    /* Prepare normal machine window: */
    6159    prepareMachineWindow();
     60
     61    /* Initialization: */
     62    sltMachineStateChanged();
     63    sltAdditionsStateChanged();
     64    sltMouseCapabilityChanged();
    6265}
    6366
     
    6669    /* Cleanup normal machine window: */
    6770    cleanupMachineWindow();
    68 
    69     /* Save common logic settings: */
    70     saveLogicSettings();
    7171}
    7272
     
    9797void UIMachineLogicNormal::prepareActionConnections()
    9898{
    99     /* Base-class connections: */
     99    /* Base class connections: */
    100100    UIMachineLogic::prepareActionConnections();
    101101
     
    124124    setMachineWindowWrapper(UIMachineWindow::create(this, visualStateType()));
    125125
    126     bool bIsSaved = machineState() == KMachineState_Saved;
    127     bool bIsRunning = machineState() == KMachineState_Running ||
    128                       machineState() == KMachineState_Teleporting ||
    129                       machineState() == KMachineState_LiveSnapshotting;
    130     bool bIsRunningOrPaused = bIsRunning ||
    131                               machineState() == KMachineState_Paused;
    132 
    133126    /* If we are not started yet: */
    134     if (!bIsRunningOrPaused)
     127    if (!uisession()->isRunning() && !uisession()->isPaused())
    135128    {
    136129        /* Get current machine/console: */
     
    143136
    144137        /* Shows first run wizard if necessary: */
    145         if (isFirstTimeStarted())
     138        if (uisession()->isFirstTimeStarted())
    146139        {
    147140            UIFirstRunWzd wzd(machineWindowWrapper()->machineWindow(), machine);
     
    160153        }
    161154
    162         /* Disable auto closure because we want to have a chance to show the error dialog on startup failure: */
     155        /* Disable auto-closure because we want to have a chance to show the error dialog on startup failure: */
    163156        setPreventAutoClose(true);
    164157
    165158        /* Show "Starting/Restoring" progress dialog: */
    166         if (bIsSaved)
     159        if (uisession()->isSaved())
    167160            vboxProblem().showModalProgressDialog(progress, machine.GetName(), machineWindowWrapper()->machineWindow(), 0);
    168161        else
     
    180173        qApp->processEvents();
    181174
    182         /* Enable auto closure again: */
     175        /* Enable auto-closure again: */
    183176        setPreventAutoClose(false);
    184177
    185178        /* Check if we missed a really quick termination after successful startup, and process it if we did: */
    186         if (machineState() == KMachineState_PoweredOff || machineState() == KMachineState_Saved ||
    187             machineState() == KMachineState_Teleported || machineState() == KMachineState_Aborted)
     179        if (uisession()->isTurnedOff())
    188180        {
    189181            machineWindowWrapper()->machineWindow()->close();
     
    216208#ifdef VBOX_WITH_UPDATE_REQUEST
    217209        /* Check for updates if necessary: */
    218         vboxGlobal().showUpdateDialog(false /* aForce */);
     210        vboxGlobal().showUpdateDialog(false /* force request? */);
    219211#endif
    220212    }
     
    227219        return;
    228220
    229     /* Cleanup machine window: */
     221    /* Cleanup normal machine window: */
    230222    UIMachineWindow::destroy(machineWindowWrapper());
    231223    setMachineWindowWrapper(0);
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