Xming: Fix UT8String and CompoundText clipboard text sharing with windows clipboard
XConvertSelection() in libX11 always returns 1, so there is no point in testing it incorrectly against Success. This is possibly a bug in XConvertSelection() This should fix UTF8String and CompoundText selection via the clipboard. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
9657eae5d6
commit
091cbbaed7
|
@ -492,20 +492,12 @@ winClipboardFlushXEvents (HWND hwnd,
|
||||||
winDebug("winClipboardFlushXEvents - SelectionNotify - "
|
winDebug("winClipboardFlushXEvents - SelectionNotify - "
|
||||||
"Requesting conversion of UTF8 target.\n");
|
"Requesting conversion of UTF8 target.\n");
|
||||||
|
|
||||||
iReturn = XConvertSelection (pDisplay,
|
XConvertSelection (pDisplay,
|
||||||
event.xselection.selection,
|
event.xselection.selection,
|
||||||
XA_STRING,
|
XA_STRING,
|
||||||
atomLocalProperty,
|
atomLocalProperty,
|
||||||
iWindow,
|
iWindow,
|
||||||
CurrentTime);
|
CurrentTime);
|
||||||
if (iReturn != Success)
|
|
||||||
{
|
|
||||||
ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
|
|
||||||
"XConvertSelection () failed for UTF8String, "
|
|
||||||
"aborting: %d\n",
|
|
||||||
iReturn);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Process the ConvertSelection event */
|
/* Process the ConvertSelection event */
|
||||||
XFlush (pDisplay);
|
XFlush (pDisplay);
|
||||||
|
@ -517,20 +509,12 @@ winClipboardFlushXEvents (HWND hwnd,
|
||||||
winDebug("winClipboardFlushXEvents - SelectionNotify - "
|
winDebug("winClipboardFlushXEvents - SelectionNotify - "
|
||||||
"Requesting conversion of CompoundText target.\n");
|
"Requesting conversion of CompoundText target.\n");
|
||||||
|
|
||||||
iReturn = XConvertSelection (pDisplay,
|
XConvertSelection (pDisplay,
|
||||||
event.xselection.selection,
|
event.xselection.selection,
|
||||||
atomUTF8String,
|
atomUTF8String,
|
||||||
atomLocalProperty,
|
atomLocalProperty,
|
||||||
iWindow,
|
iWindow,
|
||||||
CurrentTime);
|
CurrentTime);
|
||||||
if (iReturn != Success)
|
|
||||||
{
|
|
||||||
ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
|
|
||||||
"XConvertSelection () failed for CompoundText, "
|
|
||||||
"aborting: %d\n",
|
|
||||||
iReturn);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Process the ConvertSelection event */
|
/* Process the ConvertSelection event */
|
||||||
XFlush (pDisplay);
|
XFlush (pDisplay);
|
||||||
|
|
Loading…
Reference in New Issue