From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12663 invoked by alias); 23 Dec 2003 11:41:03 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Reply-To: cygwin-xfree@cygwin.com Received: (qmail 12654 invoked from network); 23 Dec 2003 11:41:02 -0000 Received: from unknown (HELO mail.broadpark.no) (217.13.4.2) by sources.redhat.com with SMTP; 23 Dec 2003 11:41:02 -0000 Received: from famine (217-13-20-38.dd.nextgentel.com [217.13.20.38]) by mail.broadpark.no (Postfix) with ESMTP id B162F7925A for ; Tue, 23 Dec 2003 12:41:01 +0100 (MET) Subject: Fix to stop xwinclip from clobbering remote clipboard From: =?ISO-8859-1?Q?=D8yvind?= Harboe To: cygwin-xfree@cygwin.com Content-Type: text/plain; charset=UTF-8 Organization: Zylin AS Message-Id: <1072179661.1858.22.camel@famine> Mime-Version: 1.0 Date: Tue, 23 Dec 2003 18:26:00 -0000 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-12/txt/msg00323.txt.bz2 List-Id: 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