From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23912 invoked by alias); 6 Jan 2004 00:27:38 -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 23903 invoked from network); 6 Jan 2004 00:27:36 -0000 Received: from unknown (HELO imf23aec.mail.bellsouth.net) (205.152.59.71) by sources.redhat.com with SMTP; 6 Jan 2004 00:27:36 -0000 Received: from david.internal.NorcrossGroup.com ([68.213.19.251]) by imf23aec.mail.bellsouth.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040106002736.RPHX1950.imf23aec.mail.bellsouth.net@david.internal.NorcrossGroup.com> for ; Mon, 5 Jan 2004 19:27:36 -0500 Subject: Re: New clipboard handling notes (XFree86-xserv-4.3.0-31) From: Greg Freemyer Reply-To: freemyer-ml@NorcrossGroup.com To: cygx In-Reply-To: <3FF914DD.7070100@msu.edu> References: <3FF914DD.7070100@msu.edu> Content-Type: text/plain Message-Id: <1073348300.3510.168.camel@david.internal.NorcrossGroup.com> Mime-Version: 1.0 Date: Tue, 06 Jan 2004 00:27:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-01/txt/msg00103.txt.bz2 List-Id: Is the eventual goal of XFree86-xserv-4.3.0-31 going to be to eliminate the need for xwinclip in xdmcp setups? Or this something totally different. (I only use X to login to remote boxes.) On Mon, 2004-01-05 at 02:40, Harold L Hunt II wrote: > Here are my notes that I put together to convince myself that the new > clipboard handling was complete and would not cause infinite loops. > Please examine the notes if you are interested in the new code or if you > would like to double-check my logic for errors. > > Please review the steps and post to the list if you think you have found > an error. Also, if you find a bug or a crash, look at these steps and > try to identify the approximate location of your problem so that we can > do a better job of debugging. > > Harold > > > Copy in X11 > =========== > 1) winProcSetSelectionOwner gets called and takes ownership of the Win32 > clipboard (OpenClipboard, EmptyClipboard, SetClipboardData (foo, NULL)). > > 2) Selection is owned by another X11 client (the one that called > XSetSelectionOwner). > > 3) EmptyClipboard() in step #1 files WM_DRAWCLIPBOARD message, which is > ignored since hwnd == GetClipboardOwner (). > > 4) Paste in X11 > a) Owning X11 client handles SelectionRequest events. > > b) Item is pasted within X11 without round-trip to Win32. > > 5) Paste in Win32 > a) WM_RENDERFORMAT fires. > > b) SelectionRequest is sent, conversion from X11 to Win32 is done. > > c) SetClipboardData is called, passing converted text. > > 6) Copy in X11 (different app) > a) Goto Step #1. > > 7) Copy in Win32 > a) Clipboard is emptied and owned by the other application. > > b) WM_DRAWCLIPBOARD fires, XSetSelectionOwner is called, owning the > selection for the clipboard integration manager. > > > Copy in Win32 > ============= > 1) WM_DRAWCLIPBOARD fires, calls XSetSelectionOwner for itself. > > 2) winProcSetSelectionOwner gets called, does nothing since clipboard > X11 window is the window that is taking ownership. > > 3) Paste in Win32 > a) Clipboard owning Win32 app handles GetClipboardData call. > > b) Item is pasted without round-trip to X11. > > 4) Paste in X11 > a) Clipboard integration manager receives SelectionRequest. > > b) GetClipboardData is called, returning Win32 clipboard contents. > > c) Conversion from Win32 to X11 is done and text is pasted. > > 5) Copy in X11 > a) winProcSetSelectionOwner is called. > > b) Clipboard integration manager takes ownership of Win32 clipboard. > > c) WM_DRAWCLIPBOARD fires and is ignored since hwnd == > GetClipboardOwner (). > > 6) Copy in Win32 (different app) > a) Goto Step #1.