- Timestamp:
- Jul 6, 2021 10:55:23 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145548
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/SharedClipboard-win.h
r85121 r90054 111 111 /** Window handle which is next to us in the clipboard chain. */ 112 112 HWND hWndNextInChain; 113 /** Window handle of the clipboard owner *if* we are the owner. */ 113 /** Window handle of the clipboard owner *if* we are the owner. 114 * @todo r=bird: Ignore the misleading statement above. This is only set to 115 * NULL by the initialization code and then it's set to the clipboard owner 116 * after we announce data to the clipboard. So, essentially this will be our 117 * windows handle or NULL. End of story. */ 114 118 HWND hWndClipboardOwnerUs; 115 119 /** Structure for maintaining the new clipboard API. */ … … 152 156 int SharedClipboardWinHandleWMTimer(PSHCLWINCTX pWinCtx); 153 157 154 int SharedClipboardWin AnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats);158 int SharedClipboardWinClearAndAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats, HWND hWnd); 155 159 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 156 160 int SharedClipboardWinTransferCreate(PSHCLWINCTX pWinCtx, PSHCLTRANSFER pTransfer); -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r87611 r90054 519 519 { 520 520 #endif 521 int rc = SharedClipboardWinOpen(hwnd); 522 if (RT_SUCCESS(rc)) 523 { 524 SharedClipboardWinClear(); 525 526 rc = SharedClipboardWinAnnounceFormats(pWinCtx, fFormats); 527 } 528 529 SharedClipboardWinClose(); 530 521 SharedClipboardWinClearAndAnnounceFormats(pWinCtx, fFormats, hwnd); 531 522 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 532 523 } -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-win.cpp
r85121 r90054 819 819 * @param fFormats Clipboard format(s) to announce. 820 820 */ 821 int SharedClipboardWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats)821 static int sharedClipboardWinAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats) 822 822 { 823 823 LogFunc(("fFormats=0x%x\n", fFormats)); … … 893 893 } 894 894 895 /** 896 * Opens the clipboard, clears it, announces @a fFormats and closes it. 897 * 898 * The actual rendering (setting) of the clipboard data will be done later with 899 * a separate WM_RENDERFORMAT message. 900 * 901 * @returns VBox status code. VERR_NOT_SUPPORTED if the format is not supported / handled. 902 * @param pWinCtx Windows context to use. 903 * @param fFormats Clipboard format(s) to announce. 904 * @param hWnd The window handle to use as owner. 905 */ 906 int SharedClipboardWinClearAndAnnounceFormats(PSHCLWINCTX pWinCtx, SHCLFORMATS fFormats, HWND hWnd) 907 { 908 int rc = SharedClipboardWinOpen(hWnd); 909 if (RT_SUCCESS(rc)) 910 { 911 SharedClipboardWinClear(); 912 913 rc = sharedClipboardWinAnnounceFormats(pWinCtx, fFormats); 914 Assert(pWinCtx->hWndClipboardOwnerUs == hWnd || pWinCtx->hWndClipboardOwnerUs == NULL); 915 916 SharedClipboardWinClose(); 917 } 918 return rc; 919 } 920 895 921 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 922 896 923 /** 897 924 * Creates an Shared Clipboard transfer by announcing transfer data (via IDataObject) to Windows. … … 1208 1235 return rc; 1209 1236 } 1237 1210 1238 #endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */ 1211 1239 -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
r90050 r90054 383 383 { 384 384 #endif 385 int rc = SharedClipboardWinOpen(hWnd); 386 if (RT_SUCCESS(rc)) 387 { 388 SharedClipboardWinClear(); 389 390 rc = SharedClipboardWinAnnounceFormats(pWinCtx, fFormats); 391 392 SharedClipboardWinClose(); 393 } 394 385 int rc = SharedClipboardWinClearAndAnnounceFormats(pWinCtx, fFormats, hWnd); 395 386 if (RT_FAILURE(rc)) 396 387 LogRel(("Shared Clipboard: Reporting clipboard formats %#x to Windows host failed with %Rrc\n", fFormats, rc));
Note:
See TracChangeset
for help on using the changeset viewer.