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 18:35:27 +0100
commita02ddadb4080e3768e05c056c5a9b455fd5b7c41 (patch)
tree9844b84a5d058d8c3d820990dee35ecf4456ce20
parent69094bffec191c2e6fd797f71d9b9b11ca38982c (diff)
Xming: Fix UT8String and CompoundText clipboard text sharing with windows clipboardcygwin-patches-1.6
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);