This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

X11 Selections


Just what I've already written in IRC:

I've looked into the ICCCM to find out about the handling of X11 selections.
>From what I've read the xclient (eg xterm) just calls XSetSelectionOwner and
can do whatever he wants. The actual data is accessed only when another
client calls XConvertSelection. Is this correct?

But I have no idea what happens if the xterm calls XSetSelectionOwner, the
other app gets the data with XConvertSelection and the xterm then modifies
the selection without calling XSetSelectionOwner again  because it already
own the selection buffer.

To refine the outline the idea:

X11->Win32

 X11 client calls XSetSelectionOwner

  - get the data from the client (maybe by using a fake window or the root
    window as recipient of the clipboard data)
  - translate the data for the windows clipboard
  - OpenClipboard
  - EmptyClipboard
  - SetClipboardData
  - CloseClipboard

 If every change of the selection is indicated by XSetSelectionOwner then
 we always place the copy of the selection in the clipboard.

Win32->X11

 Win32 client copies to the clipboard

  - WindowProc receives WM_DRAWCLIPBOARD
  - call ProcSetSelectionOwner with RootWindow (or fake window) as owner

 X11 client calls XConvertSelection

  - receive SelectionRequest event
  - translate clipboard data for xclient
  - send data to client

bye
    ago

NP: Funker Vogt - Compulsions
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]