public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* New clipboard handling notes (XFree86-xserv-4.3.0-31)
@ 2004-01-05  7:40 Harold L Hunt II
  2004-01-05 12:19 ` Alexander Gottwald
  2004-01-06  0:27 ` Greg Freemyer
  0 siblings, 2 replies; 5+ messages in thread
From: Harold L Hunt II @ 2004-01-05  7:40 UTC (permalink / raw)
  To: cygx

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.


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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-05  7:40 New clipboard handling notes (XFree86-xserv-4.3.0-31) Harold L Hunt II
2004-01-05 12:19 ` Alexander Gottwald
2004-01-05 19:29   ` Harold L Hunt II
2004-01-06  0:27 ` Greg Freemyer
2004-01-06  0:45   ` 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).