Index: /trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h	(revision 8336)
+++ /trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h	(revision 8337)
@@ -183,5 +183,5 @@
     void cannotFindMachineByName (const CVirtualBox &vbox, const QString &name);
 
-    void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp);
+    void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp, ULONG64 aMinVRAM);
 
     bool confirmMachineDeletion (const CMachine &machine);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 8336)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp	(revision 8337)
@@ -1962,13 +1962,14 @@
         /* Check if the Guest Video RAM enough for the seamless mode. */
         QRect screen = QApplication::desktop()->screenGeometry (this);
-        ULONG64 availBits = (csession.GetMachine().GetVRAMSize() /* vram */
+        ULONG64 availBits = csession.GetMachine().GetVRAMSize() /* vram */
                           * _1M /* mb to bytes */
-                          - 4096 /* adapter info */
-                          - _1M /* current cache - may be changed in future */)
-                          / csession.GetMachine().GetMonitorCount()
                           * 8; /* to bits */
-        ULONG64 usedBits = screen.width() /* display width */
+        ULONG guestBpp = console->console().GetDisplay().GetBitsPerPixel();
+        ULONG64 usedBits = (screen.width() /* display width */
                          * screen.height() /* display height */
-                         * QColor::numBitPlanes(); /* bit per pixel */
+                         * guestBpp
+                         + _1M * 8) /* current cache per screen - may be changed in future */
+                         * csession.GetMachine().GetMonitorCount() /**< @todo fix assumption that all screens have same resolution */
+                         + 4096 * 8; /* adapter info */
         CGuest guest = console->console().GetGuest();
         ULONG maxWidth  = guest.GetMaxGuestWidth();
@@ -1981,5 +1982,5 @@
         {
             vboxProblem().cannotEnterSeamlessMode (screen.width(),
-                screen.height(), QColor::numBitPlanes());
+                screen.height(), guestBpp, (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M);
             return false;
         }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp	(revision 8336)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp	(revision 8337)
@@ -935,5 +935,6 @@
 void VBoxProblemReporter::cannotEnterSeamlessMode (ULONG aWidth,
                                                    ULONG aHeight,
-                                                   ULONG aBpp)
+                                                   ULONG aBpp,
+                                                   ULONG64 aMinVRAM)
 {
     message (&vboxGlobal().consoleWnd(), Error,
@@ -942,6 +943,5 @@
                  "<p>You should configure the VM to have at least <b>%1</b> "
                  "of video memory.</p>")
-             .arg (VBoxGlobal::formatSize ((ULONG64) (aWidth * aHeight *
-                                                      aBpp / 8 + _1M - 1))));
+             .arg (VBoxGlobal::formatSize (aMinVRAM)));
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxProblemReporter.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxProblemReporter.h	(revision 8336)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/VBoxProblemReporter.h	(revision 8337)
@@ -182,5 +182,5 @@
     void cannotFindMachineByName (const CVirtualBox &vbox, const QString &name);
 
-    void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp);
+    void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp, ULONG64 aMinVRAM);
 
     bool confirmMachineDeletion (const CMachine &machine);
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp	(revision 8336)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp	(revision 8337)
@@ -1985,13 +1985,14 @@
         /* Check if the Guest Video RAM enough for the seamless mode. */
         QRect screen = QApplication::desktop()->screenGeometry (this);
-        ULONG64 availBits = (csession.GetMachine().GetVRAMSize() /* vram */
+        ULONG64 availBits = csession.GetMachine().GetVRAMSize() /* vram */
                           * _1M /* mb to bytes */
-                          - 4096 /* adapter info */
-                          - _1M /* current cache - may be changed in future */)
-                          / csession.GetMachine().GetMonitorCount()
                           * 8; /* to bits */
-        ULONG64 usedBits = screen.width() /* display width */
+        ULONG guestBpp = console->console().GetDisplay().GetBitsPerPixel();
+        ULONG64 usedBits = (screen.width() /* display width */
                          * screen.height() /* display height */
-                         * depth(); /* bit per pixel */
+                         * guestBpp
+                         + _1M * 8) /* current cache per screen - may be changed in future */
+                         * csession.GetMachine().GetMonitorCount() /**< @todo fix assumption that all screens have same resolution */
+                         + 4096 * 8; /* adapter info */
         CGuest guest = console->console().GetGuest();
         ULONG maxWidth  = guest.GetMaxGuestWidth();
@@ -2004,5 +2005,5 @@
         {
             vboxProblem().cannotEnterSeamlessMode (screen.width(),
-                screen.height(), depth());
+                screen.height(), guestBpp, (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M);
             return false;
         }
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp	(revision 8336)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp	(revision 8337)
@@ -943,5 +943,6 @@
 void VBoxProblemReporter::cannotEnterSeamlessMode (ULONG aWidth,
                                                    ULONG aHeight,
-                                                   ULONG aBpp)
+                                                   ULONG aBpp,
+                                                   ULONG64 aMinVRAM)
 {
     message (&vboxGlobal().consoleWnd(), Error,
@@ -950,6 +951,5 @@
                  "<p>You should configure the VM to have at least <b>%1</b> "
                  "of video memory.</p>")
-             .arg (VBoxGlobal::formatSize ((ULONG64) (aWidth * aHeight *
-                                                      aBpp / 8 + _1M - 1))));
+             .arg (VBoxGlobal::formatSize (aMinVRAM)));
 }
 
