VirtualBox

Changeset 91435 in vbox for trunk/src


Ignore:
Timestamp:
Sep 28, 2021 1:10:21 PM (3 years ago)
Author:
vboxsync
Message:

Shared Clipboard: prevent guest clipboard reset when clipboard sharing is disabled, bugref:10110, ticketref:20487.

This commit prevents host service from notifying guest about new data appearance
in host clipboard buffer when clipboard sharing is disabled. When such notification
was sent in such situation, it triggered guest to ask host for a clipboard content.
Such request was rejected on a host side what, in turn, resulted in guest clipboard
content loss.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r90805 r91435  
    14071407int ShClSvcHostReportFormats(PSHCLCLIENT pClient, SHCLFORMATS fFormats)
    14081408{
     1409    /*
     1410     * Check if the service mode allows this operation and whether the guest is
     1411     * supposed to be reading from the host. Otherwise, silently ignore reporting
     1412     * formats and return VINF_SUCCESS in order to do not trigger client
     1413     * termination in svcConnect().
     1414     */
     1415    uint32_t uMode = ShClSvcGetMode();
     1416    if (   uMode == VBOX_SHCL_MODE_BIDIRECTIONAL
     1417        || uMode == VBOX_SHCL_MODE_HOST_TO_GUEST)
     1418    { /* likely */ }
     1419    else
     1420        return VINF_SUCCESS;
     1421
    14091422    AssertPtrReturn(pClient, VERR_INVALID_POINTER);
    14101423
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette