VirtualBox

Changeset 82851 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 24, 2020 10:58:39 AM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard: Set the transfer source for all platforms in a common way in ShClSvcHostReportFormats(). bugref:9437

Location:
trunk/src/VBox/HostServices/SharedClipboard
Files:
2 edited

Legend:

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

    r82846 r82851  
    55
    66/*
    7  * Copyright (C) 2006-2019 Oracle Corporation
     7 * Copyright (C) 2006-2020 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    235235                    /* Clipboard was updated by another application, retrieve formats and report back. */
    236236                    rc = vboxClipboardSvcWinSyncInternal(pCtx);
    237                     if (RT_SUCCESS(rc))
    238                         rc = shClSvcSetSource(pCtx->pClient, SHCLSOURCE_LOCAL);
    239237                }
    240238                else
     
    277275                    /* Clipboard was updated by another application, retrieve formats and report back. */
    278276                    rc = vboxClipboardSvcWinSyncInternal(pCtx);
    279                     if (RT_SUCCESS(rc))
    280                         shClSvcSetSource(pCtx->pClient, SHCLSOURCE_LOCAL);
    281277                }
    282278                else
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r82849 r82851  
    12851285        RTCritSectLeave(&pClient->CritSect);
    12861286
    1287         /*
    1288          * ...
    1289          */
    12901287#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    1291 # error fixme
    12921288        /* If we announce an URI list, create a transfer locally and also tell the guest to create
    12931289         * a transfer on the guest side. */
     
    12961292            rc = shClSvcTransferStart(pClient, SHCLTRANSFERDIR_TO_REMOTE, SHCLSOURCE_LOCAL,
    12971293                                      NULL /* pTransfer */);
     1294            if (RT_SUCCESS(rc))
     1295                rc = shClSvcSetSource(pClient, SHCLSOURCE_LOCAL);
     1296
    12981297            if (RT_FAILURE(rc))
    12991298                LogRel(("Shared Clipboard: Initializing host write transfer failed with %Rrc\n", rc));
     
    13051304            rc = VINF_SUCCESS;
    13061305        }
    1307         /** @todo r=bird: shouldn't we also call shClSvcSetSource(pClient, SHCLSOURCE_LOCAL) here??
    1308          * Looks like the caller of this function does it, but only on windows.  Very helpful. */
    13091306    }
    13101307    else
     
    17131710}
    17141711
     1712/**
     1713 * Sets the transfer source type of a Shared Clipboard client.
     1714 *
     1715 * @returns VBox status code.
     1716 * @param   pClient             Client to set transfer source type for.
     1717 * @param   enmSource           Source type to set.
     1718 */
    17151719int shClSvcSetSource(PSHCLCLIENT pClient, SHCLSOURCE enmSource)
    17161720{
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