Index: trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h	(revision 8901)
+++ trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h	(revision 8902)
@@ -102,5 +102,5 @@
     void setIgnoreMainwndResize (bool aYes) { mIgnoreMainwndResize = aYes; }
 
-    QRect getDesktopGeometry();
+    QRect desktopGeometry();
 
     bool isAutoresizeGuestActive();
@@ -199,9 +199,12 @@
 private:
 
-    enum meDesktopGeo {
-        invalid = 0, fixed, automatic, any, unchanged
+    enum DesktopGeo
+    {
+        DesktopGeo_Invalid = 0, DesktopGeo_Fixed,
+        DesktopGeo_Automatic, DesktopGeo_Any, DesktopGeo_Unchanged
     };
-    void setDesktopGeometry(meDesktopGeo type, int width, int height);
-    void setDesktopGeoHint(int width, int height);
+
+    void setDesktopGeometry (DesktopGeo aGeo, int aWidth, int aHeight);
+    void setDesktopGeoHint (int aWidth, int aHeight);
     void maybeRestrictMinimumSize();
 
@@ -290,5 +293,5 @@
     CGImageRef mVirtualBoxLogo;
 #endif
-    meDesktopGeo mDesktopGeoType;
+    DesktopGeo mDesktopGeo;
     QRect mDesktopGeometry;
     QRect mLastSizeHint;
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp	(revision 8901)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp	(revision 8902)
@@ -646,5 +646,5 @@
     , mVirtualBoxLogo (NULL)
 #endif
-    , mDesktopGeoType(invalid)
+    , mDesktopGeo (DesktopGeo_Invalid)
 {
     Assert (!mConsole.isNull() &&
@@ -771,19 +771,18 @@
 
     QString desktopGeometry = vboxGlobal().settings()
-                                  .publicProperty("GUI/MaxGuestResolution");
-    if (   (QString::null == desktopGeometry)
-        || ("auto" == desktopGeometry)
-       )
-        setDesktopGeometry(automatic, 0, 0);
-    else if ("any" == desktopGeometry)
-        setDesktopGeometry(any, 0, 0);
+                                  .publicProperty ("GUI/MaxGuestResolution");
+    if ((desktopGeometry == QString::null) ||
+        (desktopGeometry == "auto"))
+        setDesktopGeometry (DesktopGeo_Automatic, 0, 0);
+    else if (desktopGeometry == "any")
+        setDesktopGeometry (DesktopGeo_Any, 0, 0);
     else
     {
-        int width = desktopGeometry.section(',', 0, 0).toInt();
-        int height = desktopGeometry.section(',', 1, 1).toInt();
-        setDesktopGeometry(fixed, width, height);
-    }
-    connect (QApplication::desktop(), SIGNAL(workAreaResized(int)),
-             this, SLOT(doResizeDesktop(int)));
+        int width = desktopGeometry.section (',', 0, 0).toInt();
+        int height = desktopGeometry.section (',', 1, 1).toInt();
+        setDesktopGeometry (DesktopGeo_Fixed, width, height);
+    }
+    connect (QApplication::desktop(), SIGNAL (workAreaResized (int)),
+             this, SLOT (doResizeDesktop (int)));
 
 #if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT)
@@ -2285,19 +2284,20 @@
  * @returns the geometry.  An empty rectangle means unrestricted.
  */
-QRect VBoxConsoleView::getDesktopGeometry()
+QRect VBoxConsoleView::desktopGeometry()
 {
     QRect rc;
-    switch (mDesktopGeoType)
-    {
-    case fixed:
-    case automatic:
-        rc = QRect (0, 0, RT_MAX(mDesktopGeometry.width(), mLastSizeHint.width()),
-                    RT_MAX(mDesktopGeometry.height(), mLastSizeHint.height()));
-        break;
-    case any:
-        rc = QRect (0, 0, 0, 0);
-        break;
-    default:
-        AssertMsgFailed (("Bad geometry type %d\n", mDesktopGeoType));
+    switch (mDesktopGeo)
+    {
+        case DesktopGeo_Fixed:
+        case DesktopGeo_Automatic:
+            rc = QRect (0, 0,
+                        RT_MAX (mDesktopGeometry.width(), mLastSizeHint.width()),
+                        RT_MAX (mDesktopGeometry.height(), mLastSizeHint.height()));
+            break;
+        case DesktopGeo_Any:
+            rc = QRect (0, 0, 0, 0);
+            break;
+        default:
+            AssertMsgFailed (("Bad geometry type %d\n", mDesktopGeo));
     }
     return rc;
@@ -3564,5 +3564,5 @@
 
         /* Increase the desktop geometry if needed */
-        setDesktopGeoHint(sz.width(), sz.height());
+        setDesktopGeoHint (sz.width(), sz.height());
 
         if (mAutoresizeGuest)
@@ -3574,5 +3574,5 @@
 {
     /* If the desktop geometry is set automatically, this will update it. */
-    setDesktopGeometry(unchanged, 0, 0);
+    setDesktopGeometry (DesktopGeo_Unchanged, 0, 0);
 }
 
@@ -3583,14 +3583,13 @@
  * way, or to the specified lower bound, whichever is greater.
  *
- * @param fixed   Are the parameters a fixed geometry size or a lower bound?
- * @param width   The maximum width for the guest screen (fixed geometry)
- *                or a lower bound for the maximum
- * @param height  The maximum height for the guest screen (fixed geometry)
+ * @param aWidth  The maximum width for the guest screen (fixed geometry) or a
+ *                lower bound for the maximum
+ * @param aHeight The maximum height for the guest screen (fixed geometry)
  *                or a lower bound for the maximum
  */
-void VBoxConsoleView::setDesktopGeoHint(int width, int height)
-{
-    LogFlowThisFunc(("width=%d, height=%d\n", width, height));
-    mLastSizeHint = QRect (0, 0, width, height);
+void VBoxConsoleView::setDesktopGeoHint (int aWidth, int aHeight)
+{
+    LogFlowThisFunc (("aWidth=%d, aHeight=%d\n", aWidth, aHeight));
+    mLastSizeHint = QRect (0, 0, aWidth, aHeight);
 }
 
@@ -3600,50 +3599,47 @@
  * a hint from the host will always override these restrictions.
  *
- * @param type    Values: fixed - the guest has a fixed maximum framebuffer size
- *                        automatic - we recalculate the maximum size ourselves
- *                        any - any size is allowed
- * @param width   The maximum width for the guest screen or zero for no change
+ * @param aGeo    Values: fixed - the guest has a fixed maximum framebuffer
+ *                        size automatic - we recalculate the maximum size
+ *                        ourselves any - any size is allowed
+ * @param aWidth  The maximum width for the guest screen or zero for no change
  *                (only used for fixed geometry)
- * @param height  The maximum height for the guest screen or zero for no change
+ * @param aHeight The maximum height for the guest screen or zero for no change
  *                (only used for fixed geometry)
  */
-void VBoxConsoleView::setDesktopGeometry(meDesktopGeo type, int width, int height)
-{
-    LogFlowThisFunc (("type = %s, width=%d, height=%d\n",
-                      (fixed == type ? "fixed"
-                           : (automatic == type ? "automatic"
-                                 : (any == type ? "any"
-                                       : (unchanged == type ? "unchanged" : "invalid")
-                                   )
-                             )
-                      ), width, height
-                    ));
-    Assert((type != unchanged) || (mDesktopGeoType != invalid));
-    if (unchanged == type)
-        type = mDesktopGeoType;
-    switch (type)
-    {
-    case fixed:
-        mDesktopGeoType = fixed;
-        if ((0 != width ) && (0 != height))
-            mDesktopGeometry = QRect (0, 0, width, height);
-        setDesktopGeoHint (0, 0);
-        break;
-    case automatic:
-    {
-        mDesktopGeoType = automatic;
-        QRect desktop = QApplication::desktop()->screenGeometry (this);
-        mDesktopGeometry = QRect(0, 0, desktop.width() - 100, desktop.height() - 100);
-        LogFlowThisFunc(("Setting %d, %d\n", desktop.width() - 100, desktop.height() - 100));
-        setDesktopGeoHint (0, 0);
-        break;
-    }
-    case any:
-        mDesktopGeoType = any;
-        mDesktopGeometry = QRect (0, 0, 0, 0);
-        break;
-    default:
-        AssertMsgFailed(("Invalid desktop geometry type %d\n", type));
-        mDesktopGeoType = invalid;
+void VBoxConsoleView::setDesktopGeometry (DesktopGeo aGeo, int aWidth, int aHeight)
+{
+    LogFlowThisFunc (("aGeo=%s, aWidth=%d, aHeight=%d\n",
+                      (aGeo == DesktopGeo_Fixed ? "Fixed" :
+                       aGeo == DesktopGeo_Automatic ? "Automatic" :
+                       aGeo == DesktopGeo_Any ? "Any" :
+                       aGeo == DesktopGeo_Unchanged ? "Unchanged" : "Invalid"),
+                      aWidth, aHeight));
+    Assert ((aGeo != DesktopGeo_Unchanged) || (mDesktopGeo != DesktopGeo_Invalid));
+    if (DesktopGeo_Unchanged == aGeo)
+        aGeo = mDesktopGeo;
+    switch (aGeo)
+    {
+        case DesktopGeo_Fixed:
+            mDesktopGeo = DesktopGeo_Fixed;
+            if (aWidth != 0 && aHeight != 0)
+                mDesktopGeometry = QRect (0, 0, aWidth, aHeight);
+            setDesktopGeoHint (0, 0);
+            break;
+        case DesktopGeo_Automatic:
+        {
+            mDesktopGeo = DesktopGeo_Automatic;
+            QRect desktop = QApplication::desktop()->screenGeometry (this);
+            mDesktopGeometry = QRect (0, 0, desktop.width() - 100, desktop.height() - 100);
+            LogFlowThisFunc (("Setting %d, %d\n", desktop.width() - 100, desktop.height() - 100));
+            setDesktopGeoHint (0, 0);
+            break;
+        }
+        case DesktopGeo_Any:
+            mDesktopGeo = DesktopGeo_Any;
+            mDesktopGeometry = QRect (0, 0, 0, 0);
+            break;
+        default:
+            AssertMsgFailed(("Invalid desktop geometry type %d\n", aGeo));
+            mDesktopGeo = DesktopGeo_Invalid;
     }
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp	(revision 8901)
+++ trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp	(revision 8902)
@@ -205,5 +205,5 @@
         return E_POINTER;
     *aSupported = TRUE;
-    QRect screen = mView->getDesktopGeometry();
+    QRect screen = mView->desktopGeometry();
     if (   (screen.width() != 0)
         && (aWidth > (ULONG) screen.width())
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h	(revision 8901)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h	(revision 8902)
@@ -99,5 +99,5 @@
     void setIgnoreMainwndResize (bool aYes) { mIgnoreMainwndResize = aYes; }
 
-    QRect getDesktopGeometry();
+    QRect desktopGeometry();
 
     /* todo: This are some support functions for the qt4 port. Maybe we get rid
@@ -215,9 +215,12 @@
 private:
 
-    enum meDesktopGeo {
-        invalid = 0, fixed, automatic, any, unchanged
+    enum DesktopGeo
+    {
+        DesktopGeo_Invalid = 0, DesktopGeo_Fixed,
+        DesktopGeo_Automatic, DesktopGeo_Any, DesktopGeo_Unchanged
     };
-    void setDesktopGeometry(meDesktopGeo type, int width, int height);
-    void setDesktopGeoHint(int width, int height);
+
+    void setDesktopGeometry (DesktopGeo aGeo, int aWidth, int aHeight);
+    void setDesktopGeoHint (int aWidth, int aHeight);
     void maybeRestrictMinimumSize();
 
@@ -305,5 +308,5 @@
     CGImageRef mVirtualBoxLogo;
 #endif
-    meDesktopGeo mDesktopGeoType;
+    DesktopGeo mDesktopGeo;
     QRect mDesktopGeometry;
     QRect mLastSizeHint;
Index: trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp	(revision 8901)
+++ trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp	(revision 8902)
@@ -667,5 +667,5 @@
     , mVirtualBoxLogo (NULL)
 #endif
-    , mDesktopGeoType(invalid)
+    , mDesktopGeo (DesktopGeo_Invalid)
 {
     Assert (!mConsole.isNull() &&
@@ -800,19 +800,18 @@
 
     QString desktopGeometry = vboxGlobal().settings()
-                                  .publicProperty("GUI/MaxGuestResolution");
-    if (   (QString::null == desktopGeometry)
-        || ("auto" == desktopGeometry)
-       )
-        setDesktopGeometry(automatic, 0, 0);
-    else if ("any" == desktopGeometry)
-        setDesktopGeometry(any, 0, 0);
+                                  .publicProperty ("GUI/MaxGuestResolution");
+    if ((desktopGeometry == QString::null) ||
+        (desktopGeometry == "auto"))
+        setDesktopGeometry (DesktopGeo_Automatic, 0, 0);
+    else if (desktopGeometry == "any")
+        setDesktopGeometry (DesktopGeo_Any, 0, 0);
     else
     {
-        int width = desktopGeometry.section(',', 0, 0).toInt();
-        int height = desktopGeometry.section(',', 1, 1).toInt();
-        setDesktopGeometry(fixed, width, height);
-    }
-    connect (QApplication::desktop(), SIGNAL(workAreaResized(int)),
-             this, SLOT(doResizeDesktop(int)));
+        int width = desktopGeometry.section (',', 0, 0).toInt();
+        int height = desktopGeometry.section (',', 1, 1).toInt();
+        setDesktopGeometry (DesktopGeo_Fixed, width, height);
+    }
+    connect (QApplication::desktop(), SIGNAL (workAreaResized (int)),
+             this, SLOT (doResizeDesktop (int)));
 
 #if defined (VBOX_GUI_DEBUG) && defined (VBOX_GUI_FRAMEBUF_STAT)
@@ -2316,19 +2315,20 @@
  * @returns the geometry.  An empty rectangle means unrestricted.
  */
-QRect VBoxConsoleView::getDesktopGeometry()
+QRect VBoxConsoleView::desktopGeometry()
 {
     QRect rc;
-    switch (mDesktopGeoType)
-    {
-    case fixed:
-    case automatic:
-        rc = QRect (0, 0, RT_MAX(mDesktopGeometry.width(), mLastSizeHint.width()),
-                    RT_MAX(mDesktopGeometry.height(), mLastSizeHint.height()));
-        break;
-    case any:
-        rc = QRect (0, 0, 0, 0);
-        break;
-    default:
-        AssertMsgFailed (("Bad geometry type %d\n", mDesktopGeoType));
+    switch (mDesktopGeo)
+    {
+        case DesktopGeo_Fixed:
+        case DesktopGeo_Automatic:
+            rc = QRect (0, 0,
+                        RT_MAX (mDesktopGeometry.width(), mLastSizeHint.width()),
+                        RT_MAX (mDesktopGeometry.height(), mLastSizeHint.height()));
+            break;
+        case DesktopGeo_Any:
+            rc = QRect (0, 0, 0, 0);
+            break;
+        default:
+            AssertMsgFailed (("Bad geometry type %d\n", mDesktopGeo));
     }
     return rc;
@@ -3582,5 +3582,5 @@
 
         /* Increase the desktop geometry if needed */
-        setDesktopGeoHint(sz.width(), sz.height());
+        setDesktopGeoHint (sz.width(), sz.height());
 
         if (mAutoresizeGuest)
@@ -3592,5 +3592,5 @@
 {
     /* If the desktop geometry is set automatically, this will update it. */
-    setDesktopGeometry(unchanged, 0, 0);
+    setDesktopGeometry (DesktopGeo_Unchanged, 0, 0);
 }
 
@@ -3601,14 +3601,13 @@
  * way, or to the specified lower bound, whichever is greater.
  *
- * @param fixed   Are the parameters a fixed geometry size or a lower bound?
- * @param width   The maximum width for the guest screen (fixed geometry)
- *                or a lower bound for the maximum
- * @param height  The maximum height for the guest screen (fixed geometry)
+ * @param aWidth  The maximum width for the guest screen (fixed geometry) or a
+ *                lower bound for the maximum
+ * @param aHeight The maximum height for the guest screen (fixed geometry)
  *                or a lower bound for the maximum
  */
-void VBoxConsoleView::setDesktopGeoHint(int width, int height)
-{
-    LogFlowThisFunc(("width=%d, height=%d\n", width, height));
-    mLastSizeHint = QRect (0, 0, width, height);
+void VBoxConsoleView::setDesktopGeoHint (int aWidth, int aHeight)
+{
+    LogFlowThisFunc (("aWidth=%d, aHeight=%d\n", aWidth, aHeight));
+    mLastSizeHint = QRect (0, 0, aWidth, aHeight);
 }
 
@@ -3618,50 +3617,47 @@
  * a hint from the host will always override these restrictions.
  *
- * @param type    Values: fixed - the guest has a fixed maximum framebuffer size
- *                        automatic - we recalculate the maximum size ourselves
- *                        any - any size is allowed
- * @param width   The maximum width for the guest screen or zero for no change
+ * @param aGeo    Values: fixed - the guest has a fixed maximum framebuffer
+ *                        size automatic - we recalculate the maximum size
+ *                        ourselves any - any size is allowed
+ * @param aWidth  The maximum width for the guest screen or zero for no change
  *                (only used for fixed geometry)
- * @param height  The maximum height for the guest screen or zero for no change
+ * @param aHeight The maximum height for the guest screen or zero for no change
  *                (only used for fixed geometry)
  */
-void VBoxConsoleView::setDesktopGeometry(meDesktopGeo type, int width, int height)
-{
-    LogFlowThisFunc (("type = %s, width=%d, height=%d\n",
-                      (fixed == type ? "fixed"
-                           : (automatic == type ? "automatic"
-                                 : (any == type ? "any"
-                                       : (unchanged == type ? "unchanged" : "invalid")
-                                   )
-                             )
-                      ), width, height
-                    ));
-    Assert((type != unchanged) || (mDesktopGeoType != invalid));
-    if (unchanged == type)
-        type = mDesktopGeoType;
-    switch (type)
-    {
-    case fixed:
-        mDesktopGeoType = fixed;
-        if ((0 != width ) && (0 != height))
-            mDesktopGeometry = QRect (0, 0, width, height);
-        setDesktopGeoHint (0, 0);
-        break;
-    case automatic:
-    {
-        mDesktopGeoType = automatic;
-        QRect desktop = QApplication::desktop()->screenGeometry (this);
-        mDesktopGeometry = QRect(0, 0, desktop.width() - 100, desktop.height() - 100);
-        LogFlowThisFunc(("Setting %d, %d\n", desktop.width() - 100, desktop.height() - 100));
-        setDesktopGeoHint (0, 0);
-        break;
-    }
-    case any:
-        mDesktopGeoType = any;
-        mDesktopGeometry = QRect (0, 0, 0, 0);
-        break;
-    default:
-        AssertMsgFailed(("Invalid desktop geometry type %d\n", type));
-        mDesktopGeoType = invalid;
+void VBoxConsoleView::setDesktopGeometry (DesktopGeo aGeo, int aWidth, int aHeight)
+{
+    LogFlowThisFunc (("aGeo=%s, aWidth=%d, aHeight=%d\n",
+                      (aGeo == DesktopGeo_Fixed ? "Fixed" :
+                       aGeo == DesktopGeo_Automatic ? "Automatic" :
+                       aGeo == DesktopGeo_Any ? "Any" :
+                       aGeo == DesktopGeo_Unchanged ? "Unchanged" : "Invalid"),
+                      aWidth, aHeight));
+    Assert ((aGeo != DesktopGeo_Unchanged) || (mDesktopGeo != DesktopGeo_Invalid));
+    if (DesktopGeo_Unchanged == aGeo)
+        aGeo = mDesktopGeo;
+    switch (aGeo)
+    {
+        case DesktopGeo_Fixed:
+            mDesktopGeo = DesktopGeo_Fixed;
+            if (aWidth != 0 && aHeight != 0)
+                mDesktopGeometry = QRect (0, 0, aWidth, aHeight);
+            setDesktopGeoHint (0, 0);
+            break;
+        case DesktopGeo_Automatic:
+        {
+            mDesktopGeo = DesktopGeo_Automatic;
+            QRect desktop = QApplication::desktop()->screenGeometry (this);
+            mDesktopGeometry = QRect (0, 0, desktop.width() - 100, desktop.height() - 100);
+            LogFlowThisFunc (("Setting %d, %d\n", desktop.width() - 100, desktop.height() - 100));
+            setDesktopGeoHint (0, 0);
+            break;
+        }
+        case DesktopGeo_Any:
+            mDesktopGeo = DesktopGeo_Any;
+            mDesktopGeometry = QRect (0, 0, 0, 0);
+            break;
+        default:
+            AssertMsgFailed(("Invalid desktop geometry type %d\n", aGeo));
+            mDesktopGeo = DesktopGeo_Invalid;
     }
 }
Index: trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp	(revision 8901)
+++ trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFrameBuffer.cpp	(revision 8902)
@@ -206,5 +206,5 @@
         return E_POINTER;
     *aSupported = TRUE;
-    QRect screen = mView->getDesktopGeometry();
+    QRect screen = mView->desktopGeometry();
     if (   (screen.width() != 0)
         && (aWidth > (ULONG) screen.width())
