Index: /trunk/include/VBox/VBoxDev.h
===================================================================
--- /trunk/include/VBox/VBoxDev.h	(revision 7408)
+++ /trunk/include/VBox/VBoxDev.h	(revision 7409)
@@ -61,4 +61,10 @@
 /** the guest supports mapping guest to host windows */
 #define VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING     RT_BIT(1)
+/** 
+ * the guest graphical additions are active - used for fast activation
+ * and deactivation of certain graphical operations.
+ * The legacy VMMDevReq_ReportGuestCapabilities request sets this
+ * automatically, but VMMDevReq_SetGuestCapabilities does not. */
+#define VMMDEV_GUEST_SUPPORTS_GRAPHICS                      RT_BIT(2)
 /** @} */
 
Index: /trunk/include/VBox/VBoxGuest.h
===================================================================
--- /trunk/include/VBox/VBoxGuest.h	(revision 7408)
+++ /trunk/include/VBox/VBoxGuest.h	(revision 7409)
@@ -149,4 +149,5 @@
     VMMDevReq_GetDisplayChangeRequest2   = 54,
     VMMDevReq_ReportGuestCapabilities    = 55,
+    VMMDevReq_SetGuestCapabilities       = 56,
 #ifdef VBOX_HGCM
     VMMDevReq_HGCMConnect                = 60,
@@ -286,4 +287,15 @@
     uint32_t    caps;
 } VMMDevReqGuestCapabilities;
+
+/** guest capabilites structure */
+typedef struct
+{
+    /** header */
+    VMMDevRequestHeader header;
+    /** mask of capabilities to be added */
+    uint32_t    u32OrMask;
+    /** mask of capabilities to be removed */
+    uint32_t    u32NotMask;
+} VMMDevReqGuestCapabilities2;
 
 /** idle request structure */
Index: /trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
===================================================================
--- /trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp	(revision 7408)
+++ /trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp	(revision 7409)
@@ -521,4 +521,8 @@
                 VMMDevReqGuestCapabilities *guestCaps = (VMMDevReqGuestCapabilities*)pRequestHeader;
 
+                /* Enable this automatically for guests using the old
+                   request to report their capabilities. */
+                /** @todo change this when we next bump the interface version */
+                guestCaps->caps |= VMMDEV_GUEST_SUPPORTS_GRAPHICS;
                 if (pData->guestCaps != guestCaps->caps)
                 {
@@ -528,11 +532,43 @@
                     LogRel(("Guest Additions capability report: (0x%x) "
                             "VMMDEV_GUEST_SUPPORTS_SEAMLESS: %s "
-                            "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s\n",
+                            "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s"
+                            "VMMDEV_GUEST_SUPPORTS_GRAPHICS: %s\n",
                             guestCaps->caps,
                             guestCaps->caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no",
-                            guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no"));
+                            guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no",
+                            guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no"));
 
                     pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, guestCaps->caps);
                 }
+                pRequestHeader->rc = VINF_SUCCESS;
+            }
+            break;
+        }
+
+        /* Change guest capabilities */
+        case VMMDevReq_SetGuestCapabilities:
+        {
+            if (pRequestHeader->size != sizeof(VMMDevReqGuestCapabilities2))
+            {
+                AssertMsgFailed(("VMMDev guest caps structure has invalid size!\n"));
+                pRequestHeader->rc = VERR_INVALID_PARAMETER;
+            }
+            else
+            {
+                VMMDevReqGuestCapabilities2 *guestCaps = (VMMDevReqGuestCapabilities2*)pRequestHeader;
+
+                pData->guestCaps |= guestCaps->u32OrMask;
+                pData->guestCaps &= ~guestCaps->u32NotMask;
+
+                LogRel(("Guest Additions capability report: (0x%x) "
+                        "VMMDEV_GUEST_SUPPORTS_SEAMLESS: %s "
+                        "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s"
+                        "VMMDEV_GUEST_SUPPORTS_GRAPHICS: %s\n",
+                        pData->guestCaps,
+                        pData->guestCaps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no",
+                        pData->guestCaps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no",
+                        pData->guestCaps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no"));
+
+                pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps);
                 pRequestHeader->rc = VINF_SUCCESS;
             }
@@ -2294,5 +2330,4 @@
     pData->fu32AdditionsOk = false;
     memset (&pData->guestInfo, 0, sizeof (pData->guestInfo));
-    pData->guestCaps = 0;
 
     memset (&pData->lastReadDisplayChangeRequest, 0, sizeof (pData->lastReadDisplayChangeRequest));
@@ -2316,4 +2351,9 @@
     pData->u32NewGuestFilterMask = 0;
     pData->fNewGuestFilterMask   = 0;
+
+    /* This is the default, as Windows and OS/2 guests take this for granted. */
+    /** @todo change this when we next bump the interface version */
+    pData->guestCaps = VMMDEV_GUEST_SUPPORTS_GRAPHICS;
+    pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps);
 }
 
Index: /trunk/src/VBox/Main/GuestImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/GuestImpl.cpp	(revision 7408)
+++ /trunk/src/VBox/Main/GuestImpl.cpp	(revision 7409)
@@ -172,4 +172,19 @@
 }
 
+STDMETHODIMP Guest::COMGETTER(SupportsGraphics) (BOOL *aSupportsGraphics)
+{
+    if (!aSupportsGraphics)
+        return E_POINTER;
+
+    AutoCaller autoCaller (this);
+    CheckComRCReturnRC (autoCaller.rc());
+
+    AutoReaderLock alock (this);
+
+    *aSupportsGraphics = mData.mSupportsGraphics;
+
+    return S_OK;
+}
+
 STDMETHODIMP Guest::COMGETTER(MemoryBalloonSize) (ULONG *aMemoryBalloonSize)
 {
@@ -327,2 +342,12 @@
     mData.mSupportsSeamless = aSupportsSeamless;
 }
+
+void Guest::setSupportsGraphics (BOOL aSupportsGraphics)
+{
+    AutoCaller autoCaller (this);
+    AssertComRCReturnVoid (autoCaller.rc());
+
+    AutoLock alock (this);
+
+    mData.mSupportsGraphics = aSupportsGraphics;
+}
Index: /trunk/src/VBox/Main/VMMDevInterface.cpp
===================================================================
--- /trunk/src/VBox/Main/VMMDevInterface.cpp	(revision 7408)
+++ /trunk/src/VBox/Main/VMMDevInterface.cpp	(revision 7409)
@@ -202,7 +202,6 @@
         return;
 
-    Assert(!(newCapabilities & ~VMMDEV_GUEST_SUPPORTS_SEAMLESS));
-
     guest->setSupportsSeamless(BOOL (newCapabilities & VMMDEV_GUEST_SUPPORTS_SEAMLESS));
+    guest->setSupportsGraphics(BOOL (newCapabilities & VMMDEV_GUEST_SUPPORTS_GRAPHICS));
 
     /*
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 7408)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 7409)
@@ -5139,5 +5139,6 @@
   <interface
      name="IGuest" extends="$unknown"
-     uuid="c101f037-b03d-4bd4-bd25-381123980be2"
+     uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
+
      wsmap="suppress"
      >
@@ -5188,4 +5189,13 @@
         Flag whether seamless guest display rendering (seamless desktop
         integration) is supported.
+      </desc>
+    </attribute>
+
+    <attribute name="supportsGraphics" type="boolean" readonly="yes">
+      <desc>
+        Flag whether the guest is in graphics mode.  If it is not, then
+        seamless rendering will not work, resize hints are not immediately
+        acted on and guest display resizes are probably not initiated by
+        the guest additions.
       </desc>
     </attribute>
Index: /trunk/src/VBox/Main/include/GuestImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/GuestImpl.h	(revision 7408)
+++ /trunk/src/VBox/Main/include/GuestImpl.h	(revision 7409)
@@ -58,4 +58,5 @@
     STDMETHOD(COMGETTER(AdditionsVersion)) (BSTR *aAdditionsVersion);
     STDMETHOD(COMGETTER(SupportsSeamless)) (BOOL *aSupportsSeamless);
+    STDMETHOD(COMGETTER(SupportsGraphics)) (BOOL *aSupportsGraphics);
     STDMETHOD(COMGETTER(MemoryBalloonSize)) (ULONG *aMemoryBalloonSize);
     STDMETHOD(COMSETTER(MemoryBalloonSize)) (ULONG aMemoryBalloonSize);
@@ -73,4 +74,6 @@
     void setSupportsSeamless (BOOL aSupportsSeamless);
 
+    void setSupportsGraphics (BOOL aSupportsGraphics);
+
     STDMETHOD(SetStatistic)(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG aStatVal);
 
@@ -82,5 +85,7 @@
     struct Data
     {
-        Data() : mAdditionsActive (FALSE), mSupportsSeamless (FALSE) {}
+        Data() : mAdditionsActive (FALSE), mSupportsSeamless (FALSE),
+                  /* Windows and OS/2 guests take this for granted */
+                 mSupportsGraphics (TRUE) {}
 
         Bstr  mOSTypeId;
@@ -88,4 +93,5 @@
         Bstr  mAdditionsVersion;
         BOOL  mSupportsSeamless;
+        BOOL  mSupportsGraphics;
     };
 
