This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Clipboard sometimes removes linefeeds
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: cygwin-xfree at cygwin dot com
- Date: Sat, 21 Feb 2004 11:52:58 +0100
- Subject: Clipboard sometimes removes linefeeds
- Organization: Zylin AS
- Reply-to: cygwin-xfree at cygwin dot com
The problem is that linefeeds are stripped when I paste into Windows
(and some XWin) apps.
To reproduce:
1. Select a piece of text in a mail message in Evolution from the *body*
of the text which includes linefeeds.
2. Paste into e.g. OpenOffice by pressing the middle mouse button. The
line feeds are are correctly pasted.
3. Paste into e.g. NotePad under Windows, and the linefeeds are stripped
away.
4. Paste into Emacs (running under Xwin) with the middle mouse button,
and the linefeeds are stripped.
When debugging, I got as far as verifying that the fn call below returns
a string which does not contain any linefeeds in xtpText.value
My "workaround" is to:
1. Select text in Evolution
2. Paste into an OpenOffice document
3. Select text in OpenOffice document
4. Paste to Windows app(e.g. NotePad).
/* Request the selection data */
iReturn = XGetWindowProperty (pDisplay,
iWindow,
atomLocalProperty,
0,
ulReturnBytesLeft,
False,
AnyPropertyType,
&xtpText.encoding,
&xtpText.format,
&xtpText.nitems,
&ulReturnBytesLeft,
&xtpText.value);
Øyvind