Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 6145)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 6146)
@@ -2023,4 +2023,14 @@
         delete list;
 
+#ifdef Q_WS_MAC
+        if (!aSeamless)
+        {
+            /* Make the apple menu bar go away before setMaximumSize! */
+            OSStatus orc = SetSystemUIMode (kUIModeAllHidden, kUIOptionDisableAppleMenu);
+            if (orc)
+                LogRel (("Error: Failed to change UI mode (rc=%#x) when changing to fullscreen mode. (=> menu bar trouble)\n", orc));
+        }
+#endif 
+
         /* Adjust colors and appearance. */
         erase_color = centralWidget()->eraseColor();
@@ -2034,15 +2044,11 @@
         /* Going fullscreen */
         setWindowState (windowState() ^ WindowFullScreen);
+#ifdef Q_WS_MAC /* setMask seems to not include the far border pixels. */
+        QRect maskRect = dtw->screenGeometry (this);
+        maskRect.setRight(maskRect.right() + 1);
+        maskRect.setBottom(maskRect.bottom() + 1);
+        setMask (maskRect);
+#else
         setMask (dtw->screenGeometry (this));
-
-#ifdef Q_WS_MAC
-        if (!aSeamless)
-        {
-            /* Make the apple menu bar go away. */
-            OSStatus orc = SetSystemUIMode (kUIModeAllHidden,
-                                            kUIOptionDisableAppleMenu);
-            if (orc)
-                LogRel (("Error: Failed to change UI mode (rc=%#x) when changing to fullscreen mode. (=> menu bar trouble)\n", orc));
-        }
 #endif
 
@@ -2070,7 +2076,5 @@
 #ifdef Q_WS_MAC
         if (!aSeamless)
-        {
             SetSystemUIMode (kUIModeNormal, 0);
-        }
 #endif
 
@@ -2096,7 +2100,12 @@
     }
 
+#ifdef Q_WS_MAC /* wasHidden is wrong on the mac it seems. */
+    /** @todo figure out what is really wrong here... */
+    if (!wasHidden)
+        show();
+#else
     if (wasHidden)
         hide();
-
+#endif
     return true;
 }
