- Timestamp:
- Dec 10, 2020 4:37:53 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 141867
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r87082 r87084 1355 1355 int *piFormatReturn) 1356 1356 { 1357 const unsigned cFixedTargets = 3; 1358 1359 Atom *atomTargets = (Atom *)XtMalloc((SHCL_MAX_X11_FORMATS + cFixedTargets) * sizeof(Atom)); 1357 const unsigned cFixedTargets = 3; /* See below. */ 1358 1359 Atom *pAtomTargets = (Atom *)XtMalloc((SHCL_MAX_X11_FORMATS + cFixedTargets) * sizeof(Atom)); 1360 if (!pAtomTargets) 1361 return VERR_NO_MEMORY; 1362 1360 1363 unsigned cTargets = 0; 1361 1364 SHCLX11FMTIDX idxFmt = NIL_CLIPX11FORMAT; … … 1365 1368 if (idxFmt != NIL_CLIPX11FORMAT) 1366 1369 { 1367 atomTargets[cTargets] = clipAtomForX11Format(pCtx, idxFmt);1370 pAtomTargets[cTargets] = clipAtomForX11Format(pCtx, idxFmt); 1368 1371 ++cTargets; 1369 1372 } … … 1371 1374 1372 1375 /* We always offer these fixed targets. */ 1373 atomTargets[cTargets] = clipGetAtom(pCtx, "TARGETS");1374 atomTargets[cTargets + 1] = clipGetAtom(pCtx, "MULTIPLE");1375 atomTargets[cTargets + 2] = clipGetAtom(pCtx, "TIMESTAMP");1376 pAtomTargets[cTargets] = clipGetAtom(pCtx, "TARGETS"); 1377 pAtomTargets[cTargets + 1] = clipGetAtom(pCtx, "MULTIPLE"); 1378 pAtomTargets[cTargets + 2] = clipGetAtom(pCtx, "TIMESTAMP"); 1376 1379 1377 1380 *atomTypeReturn = XA_ATOM; 1378 *pValReturn = (XtPointer) atomTargets;1381 *pValReturn = (XtPointer)pAtomTargets; 1379 1382 *pcLenReturn = cTargets + cFixedTargets; 1380 1383 *piFormatReturn = 32;
Note:
See TracChangeset
for help on using the changeset viewer.