Changeset 85833 in vbox for trunk/src/VBox/GuestHost
- Timestamp:
- Aug 19, 2020 2:04:04 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 139993
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r85831 r85833 206 206 static Atom clipAtomForX11Format(PSHCLX11CTX pCtx, SHCLX11FMTIDX uFmtIdx) 207 207 { 208 LogFlowFunc(("format=%u -> pcszAtom=%s\n", uFmtIdx, g_aFormats[uFmtIdx].pcszAtom));209 208 AssertReturn(uFmtIdx < RT_ELEMENTS(g_aFormats), 0); 210 209 return clipGetAtom(pCtx, g_aFormats[uFmtIdx].pcszAtom); … … 246 245 for (unsigned i = 0; i < RT_ELEMENTS(g_aFormats); ++i) 247 246 if (clipAtomForX11Format(pCtx, i) == atomFormat) 247 { 248 LogFlowFunc(("Returning index %u for atom '%s'\n", i, g_aFormats[i].pcszAtom)); 248 249 return i; 250 } 249 251 return NIL_CLIPX11FORMAT; 250 252 } … … 1226 1228 1227 1229 /** 1228 * Satisfies a request from X11 for clipboard targets supported by VBox. 1230 * Returns the targets supported by VBox. 1231 * 1232 * This will return a list of atoms which tells the caller 1233 * what kind of clipboard formats we support. 1229 1234 * 1230 1235 * @returns VBox status code. … … 1244 1249 int *piFormatReturn) 1245 1250 { 1246 LogFlowFuncEnter();1247 1248 1251 const unsigned cFixedTargets = 3; 1249 1252 … … 1271 1274 *piFormatReturn = 32; 1272 1275 1276 LogFlowFunc(("cTargets=%u\n", cTargets + cFixedTargets)); 1277 1273 1278 return VINF_SUCCESS; 1274 1279 } … … 1277 1282 * This is a wrapper around ShClX11RequestDataForX11Callback that will cache the 1278 1283 * data returned. 1284 * 1285 * @returns VBox status code. VERR_NO_DATA if no data available. 1286 * @param pCtx The X11 clipboard context to use. 1287 * @param Format Clipboard format to read data in. 1288 * @param ppv Where to store the allocated read data on success. 1289 * Needs to be free'd by the caller. 1290 * @param pcb Where to return the size (in bytes) of the allocated read data on success. 1279 1291 */ 1280 1292 static int clipReadVBoxShCl(PSHCLX11CTX pCtx, SHCLFORMAT Format, … … 1588 1600 1589 1601 PSHCLX11CTX pCtx = clipLookupContext(widget); 1590 int rc = VINF_SUCCESS;1591 1592 1602 if (!pCtx) 1593 1603 return False; 1594 1604 1605 /* Is this the rigt selection (clipboard) we were asked for? */ 1595 1606 if (!clipIsSupportedSelectionType(pCtx, *atomSelection)) 1596 1607 return False; 1597 1608 1609 int rc; 1598 1610 if (*atomTarget == clipGetAtom(pCtx, "TARGETS")) 1599 1611 rc = clipCreateX11Targets(pCtx, atomTypeReturn, pValReturn,
Note:
See TracChangeset
for help on using the changeset viewer.