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 - "
|
||||
"Requesting conversion of UTF8 target.\n");
|
||||
|
||||
iReturn = XConvertSelection (pDisplay,
|
||||
event.xselection.selection,
|
||||
XA_STRING,
|
||||
atomLocalProperty,
|
||||
iWindow,
|
||||
CurrentTime);
|
||||
if (iReturn != Success)
|
||||
{
|
||||
ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
|
||||
"XConvertSelection () failed for UTF8String, "
|
||||
"aborting: %d\n",
|
||||
iReturn);
|
||||
break;
|
||||
}
|
||||
XConvertSelection (pDisplay,
|
||||
event.xselection.selection,
|
||||
XA_STRING,
|
||||
atomLocalProperty,
|
||||
iWindow,
|
||||
CurrentTime);
|
||||
|
||||
/* Process the ConvertSelection event */
|
||||
XFlush (pDisplay);
|
||||
|
@ -517,20 +509,12 @@ winClipboardFlushXEvents (HWND hwnd,
|
|||
winDebug("winClipboardFlushXEvents - SelectionNotify - "
|
||||
"Requesting conversion of CompoundText target.\n");
|
||||
|
||||
iReturn = XConvertSelection (pDisplay,
|
||||
event.xselection.selection,
|
||||
atomUTF8String,
|
||||
atomLocalProperty,
|
||||
iWindow,
|
||||
CurrentTime);
|
||||
if (iReturn != Success)
|
||||
{
|
||||
ErrorF ("winClipboardFlushXEvents - SelectionNotify - "
|
||||
"XConvertSelection () failed for CompoundText, "
|
||||
"aborting: %d\n",
|
||||
iReturn);
|
||||
break;
|
||||
}
|
||||
XConvertSelection (pDisplay,
|
||||
event.xselection.selection,
|
||||
atomUTF8String,
|
||||
atomLocalProperty,
|
||||
iWindow,
|
||||
CurrentTime);
|
||||
|
||||
/* Process the ConvertSelection event */
|
||||
XFlush (pDisplay);
|
||||
|
|
Loading…
Reference in New Issue
Block a user