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]

Efforts to make xwinclip/-clipboard not steal the selection [Fwd:[Xoncygwin-cvs] CVS Update: xc (branch: trunk)]


Okay, since the selection stealing by xwinclip/-clipboard probably generates the largest amount of annoying questions on this mailing list, I decided to finally spend a little time trying to redo this properly.

I had been meaning to look at Keith Packard's XFIXES extension that was added to the XFree86 CVS last November and was subsequently removed before 4.3.0 was released. Tonight I looked through the pieces that of that patch that added a new type of callback function for selection changes. Callbacks for this can be registered by calling AddCallback...

Tonight I applied those few pieces of Keith's code for the selection callback to our SourceForge CVS tree. I also added a file to hw/xwin called winclipboardcallback.c and I added a call in winscrinit.c that registers a callback. Forgive the poor function names... but it is past bed time (you'll know what I mean if you look at the CVS).

The code compiles and runs. When the selection changes, it prints a message to the log file via ErrorF. So, we are at least able to detect when the selection changes now.

There are two steps that I will be taking next (or appreciating help from others on):

1) Make a few simple changes to the -clipboard functionality that registers a callback for the selection change events. Stop stealing the selection when something in X is copied. This would immediately improve -clipboard since it would no longer steal the selection and it would still support wonderful things like non-ANSI text conversion.

2) Change the clipboard functionality from an X Client to just another set of functions in the X Server. This is possible because we no longer have to wait for the X Client SelectionNotify events, etc., but it may prove difficult to find the X Server interface to the functions that convert selections into the desired format. On the other hand, this may be really easy.


I would *really* like to do (1) first, even if (2) were to follow as soon as later the same day. I think that (1) is achievable within 8 hours. I may have something tomorrow. I would appreciate if others would look into (2) in the mean time.


Good night,

Harold


-------- Original Message -------- Subject: [Xoncygwin-cvs] CVS Update: xc (branch: trunk) Date: Tue, 03 Jun 2003 22:06:38 -0700 From: Harold Hunt <hhunt@users.sourceforge.net> Reply-To: xoncygwin-devel@lists.sourceforge.net To: xoncygwin-cvs@lists.sourceforge.net

CVSROOT:	/cvsroot/xoncygwin
Module name:	xc
Repository:	xc/programs/Xserver/include/
Changes by:	hhunt@sc8-pr-cvs1.	03/06/03 22:06:38

Log message:
Add parts of Keith Packard's XFIXES used to notify clients when the selection changes. Only built when __CYGWIN__ is defined.


Modified files:
      xc/programs/Xserver/dix/:
        dispatch.c
      xc/programs/Xserver/hw/xwin/:
        Imakefile winscrinit.c
      xc/programs/Xserver/include/:
        dix.h

  Revision      Changes    Path
  1.2           +40 -20    xc/programs/Xserver/dix/dispatch.c
  1.3           +2 -0      xc/programs/Xserver/hw/xwin/Imakefile
  1.2           +267 -53   xc/programs/Xserver/hw/xwin/winscrinit.c
  1.2           +28 -4     xc/programs/Xserver/include/dix.h



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Xoncygwin-cvs mailing list
Xoncygwin-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xoncygwin-cvs



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