VirtualBox

Ignore:
Timestamp:
Aug 21, 2019 3:04:54 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
132839
Message:

Shared Clipboard/URI: Update.

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

Legend:

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

    r80361 r80374  
    13261326                SharedClipboardURICtxTransfersCleanup(&pClientData->URI);
    13271327
    1328                 SHAREDCLIPBOARDURITRANSFERDIR enmDir = SHAREDCLIPBOARDURITRANSFERDIR_READ;
     1328                const SHAREDCLIPBOARDURITRANSFERDIR enmDir = SHAREDCLIPBOARDURITRANSFERDIR_READ;
    13291329
    13301330                PSHAREDCLIPBOARDURITRANSFER pTransfer;
     
    13411341                        creationCtx.enmSource = pClientData->State.enmSource;
    13421342
    1343                         RT_ZERO(creationCtx.Interface);
    13441343                        creationCtx.Interface.pfnTransferOpen  = vboxSvcClipboardURITransferOpen;
    13451344                        creationCtx.Interface.pfnTransferClose = vboxSvcClipboardURITransferClose;
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-utils.cpp

    r80283 r80374  
    102102        case VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_TRANSFER_START:
    103103        {
     104            Assert(pClientData->State.URI.fTransferStart == false);
     105
    104106            LogFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_TRANSFER_START\n"));
    105107
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r79630 r80374  
    166166                /* Clipboard was updated by another application, retrieve formats and report back. */
    167167                int rc = vboxClipboardSvcWinSyncInternal(pCtx);
    168                 AssertRC(rc);
    169 
    170                 vboxSvcClipboardSetSource(pCtx->pClientData, SHAREDCLIPBOARDSOURCE_LOCAL);
     168                if (RT_SUCCESS(rc))
     169                    vboxSvcClipboardSetSource(pCtx->pClientData, SHAREDCLIPBOARDSOURCE_LOCAL);
    171170            }
    172171        } break;
     
    295294        } break;
    296295
    297         case VBOX_CLIPBOARD_WM_SET_FORMATS:
    298         {
    299             LogFunc(("VBOX_CLIPBOARD_WM_SET_FORMATS\n"));
     296        case VBOX_CLIPBOARD_WM_REPORT_FORMATS:
     297        {
     298            LogFunc(("VBOX_CLIPBOARD_WM_REPORT_FORMATS\n"));
    300299
    301300            if (   pCtx->pClientData == NULL
     
    305304                 * because host clipboard has more priority.
    306305                 */
    307                 LogFunc(("VBOX_CLIPBOARD_WM_SET_FORMATS ignored; pClientData=%p\n", pCtx->pClientData));
     306                LogFunc(("VBOX_CLIPBOARD_WM_REPORT_FORMATS ignored; pClientData=%p\n", pCtx->pClientData));
    308307                break;
    309308            }
     
    351350                    LogFunc(("Failed with rc=%Rrc\n", rc));
    352351            }
    353             LogFunc(("VBOX_CLIPBOARD_WM_SET_FORMATS: fFormats=0x%x, lastErr=%ld\n", fFormats, GetLastError()));
     352            LogFunc(("VBOX_CLIPBOARD_WM_REPORT_FORMATS: fFormats=0x%x, lastErr=%ld\n", fFormats, GetLastError()));
    354353        } break;
    355354
     
    689688     * The guest announced formats. Forward to the window thread.
    690689     */
    691     PostMessage(pCtx->Win.hWnd, VBOX_CLIPBOARD_WM_SET_FORMATS,
     690    PostMessage(pCtx->Win.hWnd, VBOX_CLIPBOARD_WM_REPORT_FORMATS,
    692691                0 /* wParam */, u32Formats /* lParam */);
    693692
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r80359 r80374  
    11831183                            if (u32Formats & VBOX_SHARED_CLIPBOARD_FMT_URI_LIST)
    11841184                            {
    1185                                 /* Tell the guest that we want to start a (reading) transfer. */
     1185                                /* Tell the guest that we want to start a reading transfer
     1186                                 * (from guest to the host). */
    11861187                                rc = vboxSvcClipboardReportMsg(pClientData, VBOX_SHARED_CLIPBOARD_HOST_MSG_URI_TRANSFER_START,
    11871188                                                               0 /* u32Formats == 0 means reading data */);
     
    12931294                    else
    12941295                    {
    1295 #endif
     1296#endif /* VBOX_WITH_SHARED_CLIPBOARD_URI_LIST */
    12961297                        void    *pv;
    12971298                        uint32_t cb;
Note: See TracChangeset for help on using the changeset viewer.

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