This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Clipboard progress
- From: Harold L Hunt II <huntharo at msu dot edu>
- To: cygx <cygwin-xfree at cygwin dot com>
- Date: Tue, 06 Jan 2004 01:48:24 -0500
- Subject: Clipboard progress
- Reply-to: cygwin-xfree at cygwin dot com
I don't have another release ready, so I wanted to update people on the
progress I am making:
1) I talked with Keith Packard and found out that I can use
XSetAuthorization to tell Xlib to use the cookie that I generated and
installed within the server. This allows the integrated clipboard
manager (-clipboard parameter) to connect when making an XDMCP
connection (-query parameter). It works great!
2) The only problem with step #1 is that we have to detect when we are
doing an XDMCP connection and delay the clipboard client connecting to
the X Server until the XDMCP connection has been made. If we don't,
then the XDMCP code will perform a server reset, the clipboard client
will re-attach, XDMCP will perform a reset, ad nauseum. Well, it isn't
quite that bad because the clipboard client crashes the server shortly
after the first reset :) I can detect when XDMCP is being used, but I
haven't found a good way to detect that XDMCP has connected to the X
server... I suppose I could monitor the total client count and use that
as a signal, but I would have to poll it. More later.
3) I created a new function, similar to OsVendorInit, called
OsVendorReset, that gets called from Xserver/dix/dispatch.c/Dispatch
right before KillAllClients is called. It allows me to do some
processing right before the X Server is going to reset. The primary
interest here is to shut down the clipboard client cleanly and to unwrap
the XSetSelectionOwner function so that it doesn't crash the next time
it is called. This works pretty well so far (it delays the total crash
until after two resets), but it is going to require a thorough
examination of the startup and shutdown process for the clipboard
client, as well as a complete re-write of all of that code.
4) I think the problem I saw with emacs was due to emacs using the
CLIPBOARD selection instead of the PRIMARY selection. I have not yet
added support for the CLIPBOARD selection, so applications that depend
upon it will be broken.
5) I added code that releases ownership of the Windows clipboard (if we
currently own it) when XSetSelectionOwner is called with a window of
None... that is done when an X Client says, "I don't want to own the
selection anymore".
It is probably going to take me a few days to work through all of these
issues, if not a week or more. So, be patient, and wait for better
clipboard support than we have ever had!
Harold