- Timestamp:
- Jun 15, 2007 4:54:53 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/xclient/clipboard.cpp
r2981 r3126 133 133 /** X11 atom refering to the clipboard: TIMESTAMP */ 134 134 Atom atomTimestamp; 135 /** X11 atom refering to the clipboard utf16 text format: text/plain;charset=ISO-10646-UCS-2 */ 136 Atom atomUtf16; 137 /** X11 atom refering to the clipboard utf8 text format: UTF8_STRING */ 138 Atom atomUtf8; 135 139 136 140 /** A list of the X11 formats which we support, mapped to our identifier for them, in the order … … 947 951 pu16GuestText + 1)); 948 952 RTMemFree(reinterpret_cast<void *>(pu16HostText)); 949 *atomTypeReturn = XA_STRING;953 *atomTypeReturn = g_ctx.atomUtf16; 950 954 *pValReturn = reinterpret_cast<XtPointer>(pu16GuestText); 951 955 *pcLenReturn = cwGuestText * 2; … … 1028 1032 RTMemFree(reinterpret_cast<char *>(pu16HostText)); 1029 1033 RTMemFree(reinterpret_cast<char *>(pu16GuestText)); 1030 *atomTypeReturn = XA_STRING;1034 *atomTypeReturn = g_ctx.atomUtf8; 1031 1035 *pValReturn = reinterpret_cast<XtPointer>(pcGuestText); 1032 1036 *pcLenReturn = cbGuestText; … … 1183 1187 LogFlowFunc(("giving the guest clipboard ownership\n")); 1184 1188 g_ctx.eOwner = GUEST; 1189 g_ctx.notifyHost = true; 1185 1190 LogFlowFunc(("returning\n")); 1186 1191 } … … 1207 1212 g_ctx.guestBitmapFormat = INVALID; 1208 1213 if (XtOwnSelection(g_ctx.widget, g_ctx.atomClipboard, CurrentTime, vboxClipboardConvertProc, 1209 vboxClipboardLoseProc, 0) == True) 1210 { 1211 /* We set this so that the host gets notified when we take the clipboard, even if no 1212 guest formats are found which we understand. */ 1214 vboxClipboardLoseProc, 0) != True) 1215 { 1216 Log2 (("vboxClipboardFormatAnnounce: returning clipboard ownership to the guest\n")); 1213 1217 g_ctx.notifyHost = true; 1214 }1215 else1216 {1217 Log2 (("vboxClipboardFormatAnnounce: returning clipboard ownership to the guest\n"));1218 1218 g_ctx.eOwner = GUEST; 1219 1219 } … … 1523 1523 g_ctx.atomMultiple = XInternAtom(XtDisplay(g_ctx.widget), "MULTIPLE", false); 1524 1524 g_ctx.atomTimestamp = XInternAtom(XtDisplay(g_ctx.widget), "TIMESTAMP", false); 1525 g_ctx.atomUtf16 = XInternAtom(XtDisplay(g_ctx.widget), 1526 "text/plain;charset=ISO-10646-UCS-2", false); 1527 g_ctx.atomUtf8 = XInternAtom(XtDisplay(g_ctx.widget), "UTF_STRING", false); 1525 1528 /* And build up the vector of supported formats */ 1526 1529 #ifdef USE_UTF16
Note:
See TracChangeset
for help on using the changeset viewer.