Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 30347)
@@ -110,5 +110,4 @@
 
 UIMachineView* UIMachineView::create(  UIMachineWindow *pMachineWindow
-                                     , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                      , bool bAccelerate2DVideo
@@ -122,5 +121,4 @@
         case UIVisualStateType_Normal:
             view = new UIMachineViewNormal(  pMachineWindow
-                                           , renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                            , bAccelerate2DVideo
@@ -130,5 +128,4 @@
         case UIVisualStateType_Fullscreen:
             view = new UIMachineViewFullscreen(  pMachineWindow
-                                               , renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                                , bAccelerate2DVideo
@@ -138,5 +135,4 @@
         case UIVisualStateType_Seamless:
             view = new UIMachineViewSeamless(  pMachineWindow
-                                             , renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                              , bAccelerate2DVideo
@@ -196,5 +192,4 @@
 
 UIMachineView::UIMachineView(  UIMachineWindow *pMachineWindow
-                             , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                              , bool bAccelerate2DVideo
@@ -205,5 +200,4 @@
     : QAbstractScrollArea(pMachineWindow->machineWindow())
     , m_pMachineWindow(pMachineWindow)
-    , m_mode(renderMode)
     , m_uScreenId(uScreenId)
     , m_globalSettings(vboxGlobal().settings())
@@ -464,5 +458,5 @@
 #ifdef VBOX_GUI_USE_QGLFB
     QWidget *pViewport;
-    switch (mode())
+    switch (vboxGlobal().vmRenderMode())
     {
         case VBoxDefs::QGLMode:
@@ -481,5 +475,5 @@
     m_pFrameBuffer = NULL;
 
-    switch (mode())
+    switch (vboxGlobal().vmRenderMode())
     {
 #ifdef VBOX_GUI_USE_QIMAGE
@@ -590,6 +584,6 @@
 #endif /* VBOX_GUI_USE_QUARTZ2D */
         default:
-            AssertReleaseMsgFailed(("Render mode must be valid: %d\n", mode()));
-            LogRel(("Invalid render mode: %d\n", mode()));
+            AssertReleaseMsgFailed(("Render mode must be valid: %d\n", vboxGlobal().vmRenderMode()));
+            LogRel(("Invalid render mode: %d\n", vboxGlobal().vmRenderMode()));
             qApp->exit(1);
             break;
@@ -1161,5 +1155,5 @@
         case KMachineState_TeleportingPausedVM:
         {
-            if (mode() != VBoxDefs::TimerMode &&  m_pFrameBuffer &&
+            if (vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode &&  m_pFrameBuffer &&
                 (state != KMachineState_TeleportingPausedVM || m_previousState != KMachineState_Teleporting))
             {
@@ -1198,5 +1192,5 @@
                 || m_previousState == KMachineState_Restoring)
             {
-                if (mode() != VBoxDefs::TimerMode && m_pFrameBuffer)
+                if (vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode && m_pFrameBuffer)
                 {
                     /* Reset the pixmap to free memory: */
@@ -1710,5 +1704,5 @@
     {
 #if 0 // TODO: Move that to fullscreen event-hjadler:
-        if (mode() != VBoxDefs::SDLMode)
+        if (vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode)
         {
             /* try to automatically scroll the guest canvas if the
@@ -1737,5 +1731,5 @@
             int vw = visibleWidth(), vh = visibleHeight();
 
-            if (mode() != VBoxDefs::SDLMode)
+            if (vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode)
             {
                 /* Try to automatically scroll the guest canvas if the
@@ -1833,5 +1827,5 @@
 
 #ifdef VBOX_GUI_USE_QUARTZ2D
-    if (mode() == VBoxDefs::Quartz2DMode && m_pFrameBuffer)
+    if (vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode && m_pFrameBuffer)
     {
         m_pFrameBuffer->paintEvent(pPaintEvent);
@@ -2678,5 +2672,5 @@
     {
 # ifdef VBOX_GUI_USE_QUARTZ2D
-        if (mode() == VBoxDefs::Quartz2DMode)
+        if (vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode)
         {
             /* If the render mode is Quartz2D we could use the CGImageRef
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 30347)
@@ -50,5 +50,4 @@
     /* Factory function to create required view sub-child: */
     static UIMachineView* create(  UIMachineWindow *pMachineWindow
-                                 , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                  , bool bAccelerate2DVideo
@@ -83,5 +82,4 @@
     /* Machine view constructor/destructor: */
     UIMachineView(  UIMachineWindow *pMachineWindow
-                  , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                   , bool bAccelerate2DVideo
@@ -100,5 +98,4 @@
     int visibleWidth() const;
     int visibleHeight() const;
-    VBoxDefs::RenderMode mode() const { return m_mode; }
     ulong screenId() const { return m_uScreenId; }
     UIFrameBuffer* frameBuffer() const { return m_pFrameBuffer; }
@@ -217,5 +214,4 @@
     /* Private members: */
     UIMachineWindow *m_pMachineWindow;
-    VBoxDefs::RenderMode m_mode;
     ulong m_uScreenId;
     const VBoxGlobalSettings &m_globalSettings;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 30347)
@@ -31,4 +31,5 @@
 
 /* Local includes */
+#include "VBoxGlobal.h"
 #include "UISession.h"
 #include "UIActionsPool.h"
@@ -40,5 +41,4 @@
 
 UIMachineViewFullscreen::UIMachineViewFullscreen(  UIMachineWindow *pMachineWindow
-                                                 , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                                  , bool bAccelerate2DVideo
@@ -46,5 +46,4 @@
                                                  , ulong uMonitor)
     : UIMachineView(  pMachineWindow
-                    , renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                     , bAccelerate2DVideo
@@ -379,5 +378,5 @@
      * We need to do that because we cannot correctly draw in a scrolled window in SDL mode.
      * In all other modes, or when auto-resize is in force, this function does nothing. */
-    if (mode() == VBoxDefs::SDLMode)
+    if (vboxGlobal().vmRenderMode() == VBoxDefs::SDLMode)
     {
         if (!uisession()->isGuestSupportsGraphics() || !m_bIsGuestAutoresizeEnabled)
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 30347)
@@ -29,7 +29,6 @@
 protected:
 
-    /* Normal machine view constructor/destructor: */
+    /* Fullscreen machine-view constructor/destructor: */
     UIMachineViewFullscreen(  UIMachineWindow *pMachineWindow
-                            , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                             , bool bAccelerate2DVideo
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 30347)
@@ -213,5 +213,4 @@
 
     m_pMachineView = UIMachineView::create(  this
-                                           , vboxGlobal().vmRenderMode()
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                            , bAccelerate2DVideo
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 30347)
@@ -36,5 +36,4 @@
 
 UIMachineViewNormal::UIMachineViewNormal(  UIMachineWindow *pMachineWindow
-                                         , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                          , bool bAccelerate2DVideo
@@ -42,5 +41,4 @@
                                          , ulong uMonitor)
     : UIMachineView(  pMachineWindow
-                    , renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                     , bAccelerate2DVideo
@@ -420,5 +418,5 @@
             availableGeo = dwt->availableGeometry(pTopLevelWidget->pos());
 
-        frameGeo = VBoxGlobal::normalizeGeometry(frameGeo, availableGeo, mode() != VBoxDefs::SDLMode /* can resize? */);
+        frameGeo = VBoxGlobal::normalizeGeometry(frameGeo, availableGeo, vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode /* can resize? */);
     }
 
@@ -464,5 +462,5 @@
      * We need to do that because we cannot correctly draw in a scrolled window in SDL mode.
      * In all other modes, or when auto-resize is in force, this function does nothing. */
-    if (mode() == VBoxDefs::SDLMode)
+    if (vboxGlobal().vmRenderMode() == VBoxDefs::SDLMode)
     {
         if (!uisession()->isGuestSupportsGraphics() || !m_bIsGuestAutoresizeEnabled)
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 30347)
@@ -29,7 +29,6 @@
 protected:
 
-    /* Normal machine view constructor/destructor: */
+    /* Normal machine-view constructor/destructor: */
     UIMachineViewNormal(  UIMachineWindow *pMachineWindow
-                        , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                         , bool bAccelerate2DVideo
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 30347)
@@ -473,5 +473,4 @@
 
     m_pMachineView = UIMachineView::create(  this
-                                           , vboxGlobal().vmRenderMode()
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                            , bAccelerate2DVideo
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 30347)
@@ -40,5 +40,4 @@
 
 UIMachineViewSeamless::UIMachineViewSeamless(  UIMachineWindow *pMachineWindow
-                                             , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                              , bool bAccelerate2DVideo
@@ -46,5 +45,4 @@
                                              , ulong uMonitor)
     : UIMachineView(  pMachineWindow
-                    , renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                     , bAccelerate2DVideo
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 30347)
@@ -29,7 +29,6 @@
 protected:
 
-    /* Seamless machine view constructor/destructor: */
+    /* Seamless machine-view constructor/destructor: */
     UIMachineViewSeamless(  UIMachineWindow *pMachineWindow
-                          , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
                           , bool bAccelerate2DVideo
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 30346)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 30347)
@@ -264,5 +264,4 @@
 
     m_pMachineView = UIMachineView::create(  this
-                                           , vboxGlobal().vmRenderMode()
 #ifdef VBOX_WITH_VIDEOHWACCEL
                                            , bAccelerate2DVideo
