summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Harrison <colin.harrison@virgin.net>2009-10-12 13:40:11 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2009-10-15 14:14:26 +0100
commit1a4eaff1ea6af109564fad15d0a4c710b9e28576 (patch)
tree07b58e154f9ceec14142d8a4492124aae0bd2720
parent4c09d87aec9568312f8c417890d9510cec18b7f9 (diff)
Xming: Fix UT8String and CompoundText clipboard text sharing with windows clipboardtemp
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 <jon.turney@dronecode.org.uk>
-rw-r--r--hw/xwin/winclipboardxevents.c40
1 files 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);