public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Fix to stop xwinclip from clobbering remote clipboard
@ 2003-12-23 18:26 Øyvind Harboe
  2003-12-23 19:02 ` Kensuke Matsuzaki
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Øyvind Harboe @ 2003-12-23 18:26 UTC (permalink / raw)
  To: cygwin-xfree

I'm going out on a limb here, as my experience with xfree86 is extremely
limited. Perhaps there is an option to achieve what I'm suggesting here.

Oh well! :-)

xwinclip is clobbering the clipboard when I work w/e.g. OpenOffice:

- If I copy and paste a spreadsheet cell while xwinclip is running, only
the value is copied.
- If xwinclip is not running, I can copy and paste formulas without
problems.

AFAICT, xwinclip clobbers the remote clipboard by doing a "conversion
round-trip": remote clipboard->windows clipboard->remote clipboard. Such
round trip conversions are inheritely lossy and should be avoided.

After examining the source code(see below), I've come up with the
following "scheme" for a fix:

- register a new dummy windows clipboard data type, e.g. named
"REMOTEDATA".
- whenever xwinclip updates the Windows clipboard, it also invokes
SetClipboardData(REMOTEDATA, dummyval).
- whenever xwinclip executes a paste from the Windows clipboard to e.g.
an OpenOffice spreadsheet not running under Windows, xwinclip first
checks if REMOTEDATA is present in the Windows clipboard. If the flag is
present, xwinclip effectively needs to do nothing because the remote
clipboard already contains the correct data.


http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xwin/winclipboardxevents.c


Øyvind



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-01-05 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-23 18:26 Fix to stop xwinclip from clobbering remote clipboard Øyvind Harboe
2003-12-23 19:02 ` Kensuke Matsuzaki
2003-12-23 19:18 ` Harold L Hunt II
2004-01-05 10:34 ` Hr. Daniel Mikkelsen
2004-01-05 19:20   ` Harold L Hunt II

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).