VirtualBox

Changeset 7242 in vbox


Ignore:
Timestamp:
Mar 3, 2008 3:22:38 PM (17 years ago)
Author:
vboxsync
Message:

Mac OS X: If the host clipboard is cleared or filled with unsupported content the guest clipboard is cleared also.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp

    r7241 r7242  
    6565 * @param   pfFormats      Pointer for the bit combination of the
    6666 *                         supported types.
     67 * @param   pbChanged      True if something has changed after the
     68 *                         last call.
    6769 *
    6870 * @returns IPRT status code.
    6971 */
    70 int queryNewPasteboardFormats (PasteboardRef pPasteboard, uint32_t *pfFormats)
     72int queryNewPasteboardFormats (PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pbChanged)
    7173{
    7274    Log (("queryNewPasteboardFormats\n"));
    7375
    7476    OSStatus err = noErr;
     77    *pbChanged = true;
    7578
    7679    PasteboardSyncFlags syncFlags;
     
    7982    /* If nothing changed return */
    8083    if (!(syncFlags & kPasteboardModified))
     84    {
     85        *pbChanged = false;
    8186        return VINF_SUCCESS;
     87    }
    8288
    8389    /* Are some items in the pasteboard? */
  • trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h

    r7241 r7242  
    2525void destroyPasteboard (PasteboardRef *pPasteboardRef);
    2626
    27 int queryNewPasteboardFormats (PasteboardRef pPasteboard, uint32_t *pfFormats);
     27int queryNewPasteboardFormats (PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pbChanged);
    2828int readFromPasteboard (PasteboardRef pPasteboard, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcbActual);
    2929int writeToPasteboard (PasteboardRef pPasteboard, void *pv, uint32_t cb, uint32_t fFormat);
  • trunk/src/VBox/HostServices/SharedClipboard/darwin.cpp

    r7241 r7242  
    5454
    5555    uint32_t fFormats = 0;
     56    bool bChanged = false;
    5657    /* Retrieve the formats currently in the clipboard and supported by vbox */
    57     int rc = queryNewPasteboardFormats (pCtx->pasteboard, &fFormats);
    58 
    59     if (fFormats > 0)
     58    int rc = queryNewPasteboardFormats (pCtx->pasteboard, &fFormats, &bChanged);
     59
     60    if (bChanged)
    6061    {
    6162        vboxSvcClipboardReportMsg (pCtx->pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, fFormats);
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