Changeset 82872 in vbox for trunk/src/VBox
- Timestamp:
- Jan 27, 2020 12:43:24 PM (5 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedClipboard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
r82852 r82872 91 91 /** No Shared Clipboard client flags defined. */ 92 92 #define SHCLCLIENTSTATE_FLAGS_NONE 0 93 /** Client has a guest read operation active. */93 /** Client has a guest read operation active. Currently unused. */ 94 94 #define SHCLCLIENTSTATE_FLAGS_READ_ACTIVE RT_BIT(0) 95 /** Client has a guest write operation active. */95 /** Client has a guest write operation active. Currently unused. */ 96 96 #define SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE RT_BIT(1) 97 97 /** @} */ -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r82853 r82872 1342 1342 #endif 1343 1343 { 1344 pClient->State.fFlags |= SHCLCLIENTSTATE_FLAGS_READ_ACTIVE;1345 1344 rc = VINF_SUCCESS; 1346 1345 } … … 1431 1430 rc = ShClSvcImplFormatAnnounce(pClient, &CmdCtx, &FormatData); 1432 1431 } 1433 1434 /** @todo r=bird: I'm not sure if the guest should be automatically allowed1435 * to write the host clipboard now. It would make more sense to disallow1436 * host clipboard reads until the host reports formats.1437 *1438 * The writes should only really be allowed upon request from the host,1439 * shouldn't they? (Though, I'm not sure, maybe there are situations1440 * where the guest side will just want to push the content over1441 * immediately while it's still available, I don't quite recall now...1442 */1443 if (RT_SUCCESS(rc))1444 pClient->State.fFlags |= SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE;1445 1432 } 1446 1433 } … … 1467 1454 return VERR_ACCESS_DENIED; 1468 1455 1469 /// @todo r=bird: The management of the SHCLCLIENTSTATE_FLAGS_READ_ACTIVE1470 /// makes it impossible for the guest to retrieve more than one format from1471 /// the clipboard. I.e. it can either get the TEXT or the HTML rendering,1472 /// but not both. So, I've disable the check. */1473 //ASSERT_GUEST_RETURN(pClient->State.fFlags & SHCLCLIENTSTATE_FLAGS_READ_ACTIVE, VERR_WRONG_ORDER);1474 1475 1456 /* 1476 1457 * Digest parameters. … … 1531 1512 if (pClient->State.POD.uFormat == VBOX_SHCL_FMT_NONE) 1532 1513 pClient->State.POD.uFormat = dataBlock.uFormat; 1533 /// @todo r=bird: This actively breaks copying different types of data into the1534 /// guest (first copy a text snippet, then you cannot copy any bitmaps), so I've1535 /// disabled it.1536 //ASSERT_GUEST_MSG_RETURN(pClient->State.POD.uFormat == dataBlock.uFormat,1537 // ("Requested %#x, POD.uFormat=%#x\n", dataBlock.uFormat, pClient->State.POD.uFormat),1538 // VERR_BAD_EXE_FORMAT /*VERR_INTERNAL_ERROR*/);1539 1514 } 1540 1515 … … 1595 1570 if (cbActual >= dataBlock.cbData) 1596 1571 rc = VINF_BUFFER_OVERFLOW; 1597 1598 if (rc == VINF_SUCCESS)1599 {1600 /* Only remove "read active" flag after successful read again. */1601 /** @todo r=bird: This doesn't make any effing sense. What if the guest1602 * wants to read another format??? */1603 pClient->State.fFlags &= ~SHCLCLIENTSTATE_FLAGS_READ_ACTIVE;1604 }1605 1572 } 1606 1573 … … 1623 1590 else 1624 1591 return VERR_ACCESS_DENIED; 1625 1626 /** @todo r=bird: This whole active flag stuff is broken, so disabling for now. */1627 //if (pClient->State.fFlags & SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE)1628 //{ /* likely */ }1629 //else1630 // return VERR_WRONG_ORDER;1631 1592 1632 1593 /* … … 1689 1650 if (pClient->State.POD.uFormat == VBOX_SHCL_FMT_NONE) 1690 1651 pClient->State.POD.uFormat = dataBlock.uFormat; 1691 /** @todo r=bird: this must be buggy to, I've disabled it without testing1692 * though. */1693 //ASSERT_GUEST_MSG_RETURN(pClient->State.POD.uFormat == dataBlock.uFormat,1694 // ("Requested %#x, POD.uFormat=%#x\n", dataBlock.uFormat, pClient->State.POD.uFormat),1695 // VERR_BAD_EXE_FORMAT /*VERR_INTERNAL_ERROR*/);1696 1652 } 1697 1653 … … 1713 1669 else 1714 1670 rc = ShClSvcImplWriteData(pClient, &cmdCtx, &dataBlock); 1715 if (RT_SUCCESS(rc))1716 {1717 /* Remove "write active" flag after successful read again. */1718 /** @todo r=bird: This doesn't make any effing sense. What if the host1719 * wants to have the guest write it another format??? */1720 pClient->State.fFlags &= ~SHCLCLIENTSTATE_FLAGS_WRITE_ACTIVE;1721 }1722 1671 1723 1672 LogFlowFuncLeaveRC(rc);
Note:
See TracChangeset
for help on using the changeset viewer.