Index: /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 30406)
+++ /trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 30407)
@@ -323,8 +323,8 @@
 	src/widgets/VBoxProgressDialog.h \
 	src/widgets/VBoxWarningPane.h \
+	src/runtime/UIMachine.h \
 	src/runtime/UISession.h \
 	src/runtime/UIActionsPool.h \
 	src/runtime/UIIndicatorsPool.h \
-	src/runtime/UIMachine.h \
 	src/runtime/UIMachineLogic.h \
 	src/runtime/UIMachineView.h \
@@ -456,4 +456,5 @@
 	src/widgets/VBoxProgressDialog.cpp \
 	src/widgets/VBoxWarningPane.cpp \
+	src/runtime/UIMachine.cpp \
 	src/runtime/UISession.cpp \
 	src/runtime/UIActionsPool.cpp \
@@ -463,5 +464,4 @@
 	src/runtime/UIFrameBufferQImage.cpp \
 	src/runtime/UIFrameBufferSDL.cpp \
-	src/runtime/UIMachine.cpp \
 	src/runtime/UIMachineLogic.cpp \
 	src/runtime/UIMachineWindow.cpp \
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 30406)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 30407)
@@ -231,5 +231,5 @@
 UISession* UIMachineView::uisession() const
 {
-    return machineWindowWrapper()->machineLogic()->uisession();
+    return machineLogic()->uisession();
 }
 
@@ -1105,5 +1105,5 @@
                 break;
             }
-#if defined (Q_WS_WIN32)
+#ifdef Q_WS_WIN
             /* Install/uninstall low-level kbd hook on every activation/deactivation to:
              * a) avoid excess hook calls when we're not active and
@@ -1127,5 +1127,5 @@
                 break;
             }
-#endif /* defined (Q_WS_WIN32) */
+#endif /* Q_WS_WIN */
 #ifdef Q_WS_MAC
             /* Install/remove the keyboard event handler: */
@@ -1173,7 +1173,7 @@
                 viewport()->repaint();
             }
-            /* reuse the focus event handler to uncapture everything */
+            /* Reuse the focus event handler to uncapture everything: */
             if (hasFocus())
-                focusEvent (false /* aHasFocus*/, false /* aReleaseHostKey */);
+                focusEvent(false /* aHasFocus*/, false /* aReleaseHostKey */);
             break;
         }
@@ -1201,5 +1201,5 @@
                 }
             }
-            /* Reuse the focus event handler to capture input: */
+            /* Reuse the focus event handler to capture keyboard: */
             if (hasFocus())
                 focusEvent(true /* aHasFocus */);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 30406)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 30407)
@@ -195,11 +195,11 @@
 
     /* Create machine window(s): */
-    for (int screenId = 0; screenId < m_pScreenLayout->guestScreenCount(); ++screenId)
-        addMachineWindow(UIMachineWindow::create(this, visualStateType(), screenId));
+    for (int cScreenId = 0; cScreenId < m_pScreenLayout->guestScreenCount(); ++cScreenId)
+        addMachineWindow(UIMachineWindow::create(this, visualStateType(), cScreenId));
 
     /* Connect screen-layout change handler: */
-    foreach (UIMachineWindow *pMachineWindow, machineWindows())
+    for (int i = 0; i < machineWindows().size(); ++i)
         connect(m_pScreenLayout, SIGNAL(screenLayoutChanged()),
-                static_cast<UIMachineWindowFullscreen*>(pMachineWindow), SLOT(sltPlaceOnScreen()));
+                static_cast<UIMachineWindowFullscreen*>(machineWindows()[i]), SLOT(sltPlaceOnScreen()));
 
 #ifdef Q_WS_MAC
@@ -218,5 +218,5 @@
 void UIMachineLogicFullscreen::cleanupMachineWindows()
 {
-    /* Do not cleanup machine window if it is not present: */
+    /* Do not cleanup machine window(s) if not present: */
     if (!isMachineWindowsCreated())
         return;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp	(revision 30406)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp	(revision 30407)
@@ -157,5 +157,5 @@
 void UIMachineLogicNormal::cleanupMachineWindow()
 {
-    /* Do not cleanup machine window if it is not present: */
+    /* Do not cleanup machine window(s) if not present: */
     if (!isMachineWindowsCreated())
         return;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 30406)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 30407)
@@ -181,14 +181,15 @@
 #endif /* Q_WS_MAC */
 
-    /* Update the multi screen layout */
+    /* Update the multi screen layout: */
     m_pScreenLayout->update();
 
     /* Create machine window(s): */
-    for (int screenId = 0; screenId < m_pScreenLayout->guestScreenCount(); ++screenId)
-        addMachineWindow(UIMachineWindow::create(this, visualStateType(), screenId));
-
-    foreach (UIMachineWindow *pMachineWindow, machineWindows())
+    for (int cScreenId = 0; cScreenId < m_pScreenLayout->guestScreenCount(); ++cScreenId)
+        addMachineWindow(UIMachineWindow::create(this, visualStateType(), cScreenId));
+
+    /* Connect screen-layout change handler: */
+    for (int i = 0; i < machineWindows().size(); ++i)
         connect(m_pScreenLayout, SIGNAL(screenLayoutChanged()),
-                static_cast<UIMachineWindowSeamless*>(pMachineWindow), SLOT(sltPlaceOnScreen()));
+                static_cast<UIMachineWindowSeamless*>(machineWindows()[i]), SLOT(sltPlaceOnScreen()));
 
     /* Remember what machine window(s) created: */
@@ -198,5 +199,5 @@
 void UIMachineLogicSeamless::cleanupMachineWindows()
 {
-    /* Do not cleanup machine window if it is not present: */
+    /* Do not cleanup machine window(s) if not present: */
     if (!isMachineWindowsCreated())
         return;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 30406)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 30407)
@@ -66,5 +66,5 @@
     //void prepareConnections() {}
     //void cleanupFilters() {}
-    //void cleanupCommon();
+    //void cleanupCommon() {}
 
     /* Private helpers: */
