diff options
author | Colin Harrison <colin.harrison@virgin.net> | 2009-10-12 13:40:11 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-11-09 20:33:39 +0000 |
commit | 091cbbaed7aafab6f9839a40fe977ab067d1ace1 (patch) | |
tree | cd9f25744e93350b18876f459176147124a1289f /hw | |
parent | 9657eae5d65eff289089afc46dfb629758ebbdf7 (diff) |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xwin/winclipboardxevents.c | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/hw/xwin/winclipboardxevents.c b/hw/xwin/winclipboardxevents.c index fee50f63d..ae8262ebf 100644 --- a/hw/xwin/winclipboardxevents.c +++ b/hw/xwin/winclipboardxevents.c @@ -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); |