Index: /trunk/include/VBox/HostServices/VBoxClipboardSvc.h
===================================================================
--- /trunk/include/VBox/HostServices/VBoxClipboardSvc.h	(revision 83620)
+++ /trunk/include/VBox/HostServices/VBoxClipboardSvc.h	(revision 83621)
@@ -122,6 +122,6 @@
 /** Request data for a specific format from the guest.
  *
- * Two parameters, first the 32-bit message ID followed by a  a 32-bit
- * format bit (VBOX_SHCL_FMT_XXX).  The guest will respond by issuing a
+ * Two parameters, first the 32-bit message ID followed by a 32-bit format bit
+ * (VBOX_SHCL_FMT_XXX).  The guest will respond by issuing a
  * VBOX_SHCL_GUEST_FN_DATA_WRITE.
  *
@@ -161,5 +161,5 @@
  * @note  The host may sometimes incorrectly set more than one format bit, in
  *        which case it's up to the guest to pick which to write back.
- * @since 6.3.2
+ * @since 6.1.2
  */
 #define VBOX_SHCL_HOST_MSG_READ_DATA_CID                    5
Index: /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
===================================================================
--- /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp	(revision 83620)
+++ /trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp	(revision 83621)
@@ -871,4 +871,6 @@
         RT_CASE_RET_STR(VBOX_SHCL_HOST_MSG_READ_DATA);
         RT_CASE_RET_STR(VBOX_SHCL_HOST_MSG_FORMATS_REPORT);
+        RT_CASE_RET_STR(VBOX_SHCL_HOST_MSG_CANCELED);
+        RT_CASE_RET_STR(VBOX_SHCL_HOST_MSG_READ_DATA_CID);
         RT_CASE_RET_STR(VBOX_SHCL_HOST_MSG_TRANSFER_STATUS);
         RT_CASE_RET_STR(VBOX_SHCL_HOST_MSG_TRANSFER_ROOT_LIST_HDR_READ);
Index: /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp	(revision 83620)
+++ /trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp	(revision 83621)
@@ -1209,7 +1209,7 @@
     while (fFormats)
     {
-        SHCLFORMAT fFormat = VBOX_SHCL_FMT_NONE;
-
+        /* Pick the next format to get from the mask: */
         /** @todo Make format reporting precedence configurable? */
+        SHCLFORMAT fFormat;
         if (fFormats & VBOX_SHCL_FMT_UNICODETEXT)
             fFormat = VBOX_SHCL_FMT_UNICODETEXT;
@@ -1219,10 +1219,7 @@
             fFormat = VBOX_SHCL_FMT_HTML;
         else
-            AssertStmt(fFormats == VBOX_SHCL_FMT_NONE, fFormat = VBOX_SHCL_FMT_NONE);
-
-        if (fFormat == VBOX_SHCL_FMT_NONE)
-            break;
-
-        /* Remove format from format list. */
+            AssertMsgFailedBreak(("%#x\n", fFormats));
+
+        /* Remove it from the mask. */
         fFormats &= ~fFormat;
 
@@ -1343,6 +1340,6 @@
 int ShClSvcHostReportFormats(PSHCLCLIENT pClient, SHCLFORMATS fFormats)
 {
-    LogFlowFuncEnter();
-    AssertPtrReturn(pClient,  VERR_INVALID_POINTER);
+    LogFlowFunc(("fFormats=%#x\n", fFormats));
+    AssertPtrReturn(pClient, VERR_INVALID_POINTER);
 
 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
Index: /trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp	(revision 83620)
+++ /trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp	(revision 83621)
@@ -85,7 +85,6 @@
 int queryNewPasteboardFormats(PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged)
 {
-    Log(("queryNewPasteboardFormats\n"));
-
     OSStatus err = noErr;
+    *pfFormats = 0;
     *pfChanged = true;
 
@@ -97,4 +96,5 @@
     {
         *pfChanged = false;
+        Log2(("queryNewPasteboardFormats: no change\n"));
         return VINF_SUCCESS;
     }
@@ -104,5 +104,8 @@
     err = PasteboardGetItemCount(pPasteboard, &itemCount);
     if (itemCount < 1)
+    {
+        Log(("queryNewPasteboardFormats: changed: No items on the pasteboard\n"));
         return VINF_SUCCESS;
+    }
 
     /* The id of the first element in the pasteboard */
@@ -121,16 +124,15 @@
             {
                 CFStringRef flavorType;
-                flavorType = static_cast <CFStringRef>(CFArrayGetValueAtIndex(flavorTypeArray,
-                                                                               flavorIndex));
+                flavorType = static_cast <CFStringRef>(CFArrayGetValueAtIndex(flavorTypeArray, flavorIndex));
                 /* Currently only unicode supported */
-                if (UTTypeConformsTo(flavorType, kUTTypeUTF8PlainText) ||
-                    UTTypeConformsTo(flavorType, kUTTypeUTF16PlainText))
-                {
-                    Log(("Unicode flavor detected.\n"));
+                if (   UTTypeConformsTo(flavorType, kUTTypeUTF8PlainText)
+                    || UTTypeConformsTo(flavorType, kUTTypeUTF16PlainText))
+                {
+                    Log(("queryNewPasteboardFormats: Unicode flavor detected.\n"));
                     *pfFormats |= VBOX_SHCL_FMT_UNICODETEXT;
                 }
                 else if (UTTypeConformsTo(flavorType, kUTTypeBMP))
                 {
-                    Log(("BMP flavor detected.\n"));
+                    Log(("queryNewPasteboardFormats: BMP flavor detected.\n"));
                     *pfFormats |= VBOX_SHCL_FMT_BITMAP;
                 }
@@ -140,5 +142,5 @@
     }
 
-    Log(("queryNewPasteboardFormats: rc = %02X\n", rc));
+    Log(("queryNewPasteboardFormats: changed: *pfFormats=%#x\n", *pfFormats));
     return rc;
 }
