Changeset 81960 in vbox
- Timestamp:
- Nov 18, 2019 7:00:50 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134757
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r81843 r81960 1145 1145 } 1146 1146 1147 LogRel (("Shared Clipboard: Worker loop ended\n"));1147 LogRel2(("Shared Clipboard: Worker loop ended\n")); 1148 1148 1149 1149 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS -
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp
r81843 r81960 1862 1862 RT_SUCCESS(rc) 1863 1863 ? SHCLTRANSFERSTATUS_STARTED : SHCLTRANSFERSTATUS_ERROR, rc); 1864 AssertRC(rc2); 1864 if (RT_SUCCESS(rc)) 1865 rc = rc2; 1865 1866 1866 1867 if (RT_FAILURE(rc)) -
trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
r81871 r81960 230 230 { 231 231 rc = VbglR3ClipboardConnectEx(&g_Ctx.CmdCtx); 232 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 233 if (RT_SUCCESS(rc)) 234 rc = ShClTransferCtxInit(&g_Ctx.TransferCtx); 235 #endif 236 if (RT_FAILURE(rc)) 237 ClipStopX11(g_Ctx.pBackend); 232 238 } 233 239 } … … 458 464 { 459 465 RT_NOREF(ppInterface); 466 467 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 468 ShClTransferCtxDestroy(&g_Ctx.TransferCtx); 469 #endif 470 460 471 VbglR3Term(); 461 472 } -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r81843 r81960 154 154 static Atom clipAtomForX11Format(CLIPBACKEND *pCtx, CLIPX11FORMAT format) 155 155 { 156 LogFlowFunc(("format=%u -> pcszAtom=%s\n", format, g_aFormats[format].pcszAtom)); 157 AssertReturn(format <= RT_ELEMENTS(g_aFormats), 0); 156 158 return clipGetAtom(pCtx, g_aFormats[format].pcszAtom); 157 159 } … … 162 164 static CLIPFORMAT clipRealFormatForX11Format(CLIPX11FORMAT format) 163 165 { 166 AssertReturn(format <= RT_ELEMENTS(g_aFormats), INVALID); 164 167 return g_aFormats[format].enmFormat; 165 168 } … … 168 171 static uint32_t clipVBoxFormatForX11Format(CLIPX11FORMAT format) 169 172 { 173 AssertReturn(format <= RT_ELEMENTS(g_aFormats), VBOX_SHCL_FMT_NONE); 170 174 return g_aFormats[format].u32VBoxFormat; 171 175 } … … 251 255 CLIPX11FORMAT X11URIListFormat; 252 256 #endif 253 /** What formats does VBox have onoffer? */257 /** What kind of formats does VBox have to offer? */ 254 258 SHCLFORMATS vboxFormats; 255 259 /** Cache of the last unicode data that we received */ … … 1272 1276 if (RT_SUCCESS(rc)) 1273 1277 { 1278 AssertPtrReturn(pCtx->pvUnicodeCache, VERR_INVALID_POINTER); 1279 AssertReturn (pCtx->cbUnicodeCache, VERR_INVALID_PARAMETER); 1280 1274 1281 *ppv = RTMemDup(pCtx->pvUnicodeCache, pCtx->cbUnicodeCache); 1275 1282 *pcb = pCtx->cbUnicodeCache; -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r81843 r81960 1193 1193 } 1194 1194 1195 /** 1196 * Reports available VBox clipboard formats to the guest. 1197 * 1198 * @returns VBox status code. 1199 * @param pClient Client to request to read data form. 1200 * @param pFormats Formats to report. 1201 */ 1195 1202 int ShClSvcFormatsReport(PSHCLCLIENT pClient, PSHCLFORMATDATA pFormats) 1196 1203 { … … 1200 1207 LogFlowFuncEnter(); 1201 1208 1209 uint32_t fFormats = pFormats->Formats; 1210 uint32_t fFlags = pFormats->fFlags; 1211 1212 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 1213 /* If transfer mode is set to disabled, don't report the URI list format to the guest. */ 1214 if (!(g_fTransferMode & VBOX_SHCL_TRANSFER_MODE_ENABLED)) 1215 fFormats &= ~VBOX_SHCL_FMT_URI_LIST; 1216 #endif 1217 1218 LogFlowFunc(("fFormats=0x%x -> 0x%x\n", pFormats->Formats, fFormats)); 1219 1220 /* Nothing to report? Bail out early. */ 1221 if (fFormats == VBOX_SHCL_FMT_NONE) 1222 return VINF_SUCCESS; 1223 1224 LogRel2(("Shared Clipboard: Reporting formats 0x%x to guest\n", fFormats)); 1225 1202 1226 int rc; 1203 1227 … … 1209 1233 HGCMSvcSetU64(&pMsg->paParms[0], VBOX_SHCL_CONTEXTID_MAKE(pClient->State.uSessionID, 1210 1234 pClient->Events.uID, uEvent)); 1211 HGCMSvcSetU32(&pMsg->paParms[1], pFormats->Formats);1212 HGCMSvcSetU32(&pMsg->paParms[2], 0 /* fFlags */);1235 HGCMSvcSetU32(&pMsg->paParms[1], fFormats); 1236 HGCMSvcSetU32(&pMsg->paParms[2], fFlags); 1213 1237 1214 1238 rc = shClSvcMsgAdd(pClient, pMsg, true /* fAppend */); … … 1216 1240 { 1217 1241 #ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS 1218 /* If this isan URI list, create a transfer locally and also tell the guest to create1242 /* If we announce an URI list, create a transfer locally and also tell the guest to create 1219 1243 * a transfer on the guest side. */ 1220 if ( pFormats->Formats & VBOX_SHCL_FMT_URI_LIST)1244 if (fFormats & VBOX_SHCL_FMT_URI_LIST) 1221 1245 { 1222 1246 rc = shClSvcTransferStart(pClient, SHCLTRANSFERDIR_WRITE, SHCLSOURCE_LOCAL,
Note:
See TracChangeset
for help on using the changeset viewer.