public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Clipboard progress
@ 2004-01-06  6:48 Harold L Hunt II
  2004-01-06 12:21 ` Chris Green
  0 siblings, 1 reply; 2+ messages in thread
From: Harold L Hunt II @ 2004-01-06  6:48 UTC (permalink / raw)
  To: cygx

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


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

* Re: Clipboard progress
  2004-01-06  6:48 Clipboard progress Harold L Hunt II
@ 2004-01-06 12:21 ` Chris Green
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Green @ 2004-01-06 12:21 UTC (permalink / raw)
  To: cygx

On Tue, Jan 06, 2004 at 01:48:24AM -0500, Harold L Hunt II wrote:
> 
> 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.
> 
Ah!  So that explains why I need the sleep between the -query call
which makes the XDMCP connection and calling xwinclip (I'm still using
the separate xwinclip).

-- 
Chris Green (chris@areti.co.uk)


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

end of thread, other threads:[~2004-01-06 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-06  6:48 Clipboard progress Harold L Hunt II
2004-01-06 12:21 ` Chris Green

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).