Changeset 85834 in vbox for trunk/src/VBox/Additions/x11/VBoxClient
- Timestamp:
- Aug 19, 2020 2:05:37 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp
r85798 r85834 80 80 81 81 /** 82 * Getclipboard data from the host.82 * Callback implementation for getting clipboard data from the host. 83 83 * 84 * @returns VBox result code84 * @returns VBox status code. VERR_NO_DATA if no data available. 85 85 * @param pCtx Our context information. 86 86 * @param Format The format of the data being requested. 87 87 * @param ppv On success and if pcb > 0, this will point to a buffer 88 88 * to be freed with RTMemFree containing the data read. 89 * @param pcb On success, this contains the number of bytes of data 90 * returned. 89 * @param pcb On success, this contains the number of bytes of data returned. 91 90 */ 92 91 DECLCALLBACK(int) ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, SHCLFORMAT Format, void **ppv, uint32_t *pcb) … … 138 137 } 139 138 139 if (!cbRead) 140 rc = VERR_NO_DATA; 141 140 142 if (RT_SUCCESS(rc)) 141 143 { … … 143 145 *ppv = pvData; 144 146 } 145 146 /*147 * Catch other errors. This also catches the case in which the buffer was148 * too small a second time, possibly because the clipboard contents149 * changed half-way through the operation. Since we can't say whether or150 * not this is actually an error, we just return size 0.151 */152 if (RT_FAILURE(rc))147 else 148 { 149 /* 150 * Catch other errors. This also catches the case in which the buffer was 151 * too small a second time, possibly because the clipboard contents 152 * changed half-way through the operation. Since we can't say whether or 153 * not this is actually an error, we just return size 0. 154 */ 153 155 RTMemFree(pvData); 156 } 154 157 } 155 158
Note:
See TracChangeset
for help on using the changeset viewer.