From a02ddadb4080e3768e05c056c5a9b455fd5b7c41 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Mon, 12 Oct 2009 13:40:11 +0100 Subject: 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 probably a bug in XConvertSelection() This should fix UTF8String and CompoundText selection via the clipboard. Signed-off-by: Jon TURNEY --- hw/xwin/winclipboardxevents.c | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c index 34c5e5adc..44e36c5f4 100644 --- a/hw/xwin/winclipboardxevents.c +++ b/hw/xwin/winclipboardxevents.c @@ -498,20 +498,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); @@ -523,20 +515,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); -- cgit v1.2.3