Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 99134)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 99135)
@@ -459,8 +459,8 @@
 {
     /* Make sure index feats the bounds: */
-    AssertReturn(uScreenId < (ulong)m_monitorVisibilityVectorHostDesires.size(), false);
+    AssertReturn(uScreenId < (ulong)m_guestScreenVisibilityVectorHostDesires.size(), false);
 
     /* Return 'actual' (host-desire) visibility status: */
-    return m_monitorVisibilityVectorHostDesires.value((int)uScreenId);
+    return m_guestScreenVisibilityVectorHostDesires.value((int)uScreenId);
 }
 
@@ -468,8 +468,8 @@
 {
     /* Make sure index feats the bounds: */
-    AssertReturnVoid(uScreenId < (ulong)m_monitorVisibilityVectorHostDesires.size());
+    AssertReturnVoid(uScreenId < (ulong)m_guestScreenVisibilityVectorHostDesires.size());
 
     /* Remember 'actual' (host-desire) visibility status: */
-    m_monitorVisibilityVectorHostDesires[(int)uScreenId] = fIsMonitorVisible;
+    m_guestScreenVisibilityVectorHostDesires[(int)uScreenId] = fIsMonitorVisible;
 
     /* And remember the request in extra data for guests with VMSVGA: */
@@ -481,8 +481,8 @@
 {
     /* Make sure index feats the bounds: */
-    AssertReturn(uScreenId < (ulong)m_monitorVisibilityVector.size(), false);
+    AssertReturn(uScreenId < (ulong)m_guestScreenVisibilityVector.size(), false);
 
     /* Return 'actual' visibility status: */
-    return m_monitorVisibilityVector.value((int)uScreenId);
+    return m_guestScreenVisibilityVector.value((int)uScreenId);
 }
 
@@ -490,8 +490,8 @@
 {
     /* Make sure index feats the bounds: */
-    AssertReturnVoid(uScreenId < (ulong)m_monitorVisibilityVector.size());
+    AssertReturnVoid(uScreenId < (ulong)m_guestScreenVisibilityVector.size());
 
     /* Remember 'actual' visibility status: */
-    m_monitorVisibilityVector[(int)uScreenId] = fIsMonitorVisible;
+    m_guestScreenVisibilityVector[(int)uScreenId] = fIsMonitorVisible;
     /* Remember 'desired' visibility status: */
     // See note in UIMachineView::sltHandleNotifyChange() regarding the graphics controller check. */
@@ -508,6 +508,6 @@
 {
     int cCountOfVisibleWindows = 0;
-    for (int i = 0; i < m_monitorVisibilityVector.size(); ++i)
-        if (m_monitorVisibilityVector[i])
+    for (int i = 0; i < m_guestScreenVisibilityVector.size(); ++i)
+        if (m_guestScreenVisibilityVector[i])
             ++cCountOfVisibleWindows;
     return cCountOfVisibleWindows;
@@ -517,6 +517,6 @@
 {
     QList<int> visibleWindows;
-    for (int i = 0; i < m_monitorVisibilityVector.size(); ++i)
-        if (m_monitorVisibilityVector.at(i))
+    for (int i = 0; i < m_guestScreenVisibilityVector.size(); ++i)
+        if (m_guestScreenVisibilityVector.at(i))
             visibleWindows.push_back(i);
     return visibleWindows;
@@ -1121,8 +1121,8 @@
 
         /* Remember new visual state: */
-        m_visualState = visualState;
+        m_enmVisualState = visualState;
 
         /* Save requested visual state: */
-        gEDataManager->setRequestedVisualState(m_visualState, uiCommon().managedVMUuid());
+        gEDataManager->setRequestedVisualState(m_enmVisualState, uiCommon().managedVMUuid());
     }
     else
@@ -1135,6 +1135,6 @@
     if (!m_pMachineLogic)
     {
-        /* Reset initial visual state  to normal: */
-        m_initialVisualState = UIVisualStateType_Normal;
+        /* Reset initial visual state to normal: */
+        m_enmInitialVisualState = UIVisualStateType_Normal;
         /* Enter initial visual state again: */
         enterInitialVisualState();
@@ -1411,7 +1411,7 @@
     , m_fInitialized(false)
     , m_pSession(0)
-    , m_allowedVisualStates(UIVisualStateType_Invalid)
-    , m_initialVisualState(UIVisualStateType_Normal)
-    , m_visualState(UIVisualStateType_Invalid)
+    , m_enmAllowedVisualStates(UIVisualStateType_Invalid)
+    , m_enmInitialVisualState(UIVisualStateType_Normal)
+    , m_enmVisualState(UIVisualStateType_Invalid)
     , m_enmRequestedVisualState(UIVisualStateType_Invalid)
     , m_pMachineLogic(0)
@@ -1679,16 +1679,14 @@
 #endif /* !VBOX_WS_MAC */
 
-    /* Accquire monitor count: */
+    /* Accquire guest-screen count: */
     ulong cMonitorCount = 0;
     acquireMonitorCount(cMonitorCount);
 
     /* Prepare initial screen visibility status: */
-    m_monitorVisibilityVector.resize(cMonitorCount);
-    m_monitorVisibilityVector.fill(false);
-    m_monitorVisibilityVector[0] = true;
+    m_guestScreenVisibilityVector.fill(false, cMonitorCount);
+    m_guestScreenVisibilityVector[0] = true;
 
     /* Prepare empty last full-screen size vector: */
-    m_monitorLastFullScreenSizeVector.resize(cMonitorCount);
-    m_monitorLastFullScreenSizeVector.fill(QSize(-1, -1));
+    m_monitorLastFullScreenSizeVector.fill(QSize(-1, -1), cMonitorCount);
 
     /* If machine is in 'saved' state: */
@@ -1696,5 +1694,5 @@
     {
         /* Update screen visibility status from saved-state: */
-        for (int iScreenIndex = 0; iScreenIndex < m_monitorVisibilityVector.size(); ++iScreenIndex)
+        for (int iScreenIndex = 0; iScreenIndex < m_guestScreenVisibilityVector.size(); ++iScreenIndex)
         {
             long iDummy = 0;
@@ -1702,35 +1700,35 @@
             bool fEnabled = true;
             acquireSavedGuestScreenInfo(iScreenIndex, iDummy, iDummy, uDummy, uDummy, fEnabled);
-            m_monitorVisibilityVector[iScreenIndex] = fEnabled;
+            m_guestScreenVisibilityVector[iScreenIndex] = fEnabled;
         }
         /* And make sure at least one of them is visible (primary if others are hidden): */
         if (countOfVisibleWindows() < 1)
-            m_monitorVisibilityVector[0] = true;
+            m_guestScreenVisibilityVector[0] = true;
     }
     else if (uiCommon().isSeparateProcess())
     {
         /* Update screen visibility status from display directly: */
-        for (int iScreenIndex = 0; iScreenIndex < m_monitorVisibilityVector.size(); ++iScreenIndex)
+        for (int iScreenIndex = 0; iScreenIndex < m_guestScreenVisibilityVector.size(); ++iScreenIndex)
         {
-            KGuestMonitorStatus enmMonitorStatus = KGuestMonitorStatus_Disabled;
             ulong uDummy = 0;
             long iDummy = 0;
+            KGuestMonitorStatus enmMonitorStatus = KGuestMonitorStatus_Disabled;
             acquireGuestScreenParameters(iScreenIndex, uDummy, uDummy, uDummy, iDummy, iDummy, enmMonitorStatus);
-            m_monitorVisibilityVector[iScreenIndex] = (   enmMonitorStatus == KGuestMonitorStatus_Enabled
-                                                       || enmMonitorStatus == KGuestMonitorStatus_Blank);
+            m_guestScreenVisibilityVector[iScreenIndex] = (   enmMonitorStatus == KGuestMonitorStatus_Enabled
+                                                           || enmMonitorStatus == KGuestMonitorStatus_Blank);
         }
         /* And make sure at least one of them is visible (primary if others are hidden): */
         if (countOfVisibleWindows() < 1)
-            m_monitorVisibilityVector[0] = true;
+            m_guestScreenVisibilityVector[0] = true;
     }
 
     /* Prepare initial screen visibility status of host-desires (same as facts): */
-    m_monitorVisibilityVectorHostDesires.resize(cMonitorCount);
-    for (int iScreenIndex = 0; iScreenIndex < m_monitorVisibilityVector.size(); ++iScreenIndex)
-        m_monitorVisibilityVectorHostDesires[iScreenIndex] = m_monitorVisibilityVector[iScreenIndex];
+    m_guestScreenVisibilityVectorHostDesires.resize(cMonitorCount);
+    for (int iScreenIndex = 0; iScreenIndex < m_guestScreenVisibilityVector.size(); ++iScreenIndex)
+        m_guestScreenVisibilityVectorHostDesires[iScreenIndex] = m_guestScreenVisibilityVector[iScreenIndex];
 
     /* Make sure action-pool knows guest-screen visibility status: */
-    for (int iScreenIndex = 0; iScreenIndex < m_monitorVisibilityVector.size(); ++iScreenIndex)
-        actionPool()->toRuntime()->setGuestScreenVisible(iScreenIndex, m_monitorVisibilityVector.at(iScreenIndex));
+    for (int iScreenIndex = 0; iScreenIndex < m_guestScreenVisibilityVector.size(); ++iScreenIndex)
+        actionPool()->toRuntime()->setGuestScreenVisible(iScreenIndex, m_guestScreenVisibilityVector.at(iScreenIndex));
 }
 
@@ -1763,7 +1761,7 @@
 
     /* Load restricted visual states: */
-    UIVisualStateType restrictedVisualStates = gEDataManager->restrictedVisualStates(uiCommon().managedVMUuid());
+    UIVisualStateType enmRestrictedVisualStates = gEDataManager->restrictedVisualStates(uiCommon().managedVMUuid());
     /* Acquire allowed visual states: */
-    m_allowedVisualStates = static_cast<UIVisualStateType>(UIVisualStateType_All ^ restrictedVisualStates);
+    m_enmAllowedVisualStates = static_cast<UIVisualStateType>(UIVisualStateType_All ^ enmRestrictedVisualStates);
 
     /* Load requested visual state, it can override initial one: */
@@ -1775,7 +1773,10 @@
         {
             /* Direct transition allowed to scale/fullscreen modes only: */
-            case UIVisualStateType_Scale:      m_initialVisualState = UIVisualStateType_Scale; break;
-            case UIVisualStateType_Fullscreen: m_initialVisualState = UIVisualStateType_Fullscreen; break;
-            default: break;
+            case UIVisualStateType_Scale:
+            case UIVisualStateType_Fullscreen:
+                m_enmInitialVisualState = m_enmRequestedVisualState;
+                break;
+            default:
+                break;
         }
     }
@@ -1849,5 +1850,5 @@
 void UIMachine::enterInitialVisualState()
 {
-    sltChangeVisualState(m_initialVisualState);
+    sltChangeVisualState(m_enmInitialVisualState);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h	(revision 99134)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h	(revision 99135)
@@ -179,5 +179,5 @@
 
     /** Returns whether requested visual @a state allowed. */
-    bool isVisualStateAllowed(UIVisualStateType state) const { return m_allowedVisualStates & state; }
+    bool isVisualStateAllowed(UIVisualStateType state) const { return m_enmAllowedVisualStates & state; }
 
     /** Requests async visual-state change. */
@@ -942,9 +942,9 @@
 
     /** Holds allowed visual states. */
-    UIVisualStateType m_allowedVisualStates;
+    UIVisualStateType m_enmAllowedVisualStates;
     /** Holds initial visual state. */
-    UIVisualStateType m_initialVisualState;
+    UIVisualStateType m_enmInitialVisualState;
     /** Holds current visual state. */
-    UIVisualStateType m_visualState;
+    UIVisualStateType m_enmVisualState;
     /** Holds visual state which should be entered when possible. */
     UIVisualStateType m_enmRequestedVisualState;
@@ -988,7 +988,7 @@
      ** @{ */
         /** Holds the list of desired guest-screen visibility flags. */
-        QVector<bool>  m_monitorVisibilityVectorHostDesires;
+        QVector<bool>  m_guestScreenVisibilityVectorHostDesires;
         /** Holds the list of actual guest-screen visibility flags. */
-        QVector<bool>  m_monitorVisibilityVector;
+        QVector<bool>  m_guestScreenVisibilityVector;
 
         /** Holds the list of guest-screen full-screen sizes. */
