This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
xwinclip patch
- From: uribarri_u at tsm dot es
- To: cygwin-xfree at cygwin dot com
- Date: Wed, 4 Jun 2003 10:44:53 +0200
- Subject: xwinclip patch
- Reply-to: cygwin-xfree at cygwin dot com
- Sensitivity:
What I'm requesting is so simple as this:
--- xwinclip.c.orig 2003-01-13 02:27:22.000000000 +0100
+++ xwinclip.c 2003-06-04 10:09:18.000000000 +0200
@@ -362,15 +362,6 @@
exit (1);
}
- /* Assert ownership of PRIMARY */
- iReturn = XSetSelectionOwner (pDisplay, XA_PRIMARY,
- iWindow, CurrentTime);
- if (iReturn == BadAtom || iReturn == BadWindow)
- {
- printf ("Could not set PRIMARY owner\n");
- exit (1);
- }
-
/* Local property to hold pasted data */
atomLocalProperty = XInternAtom (pDisplay, "CYGX_CUT_BUFFER", False);
if (atomLocalProperty == None)
With this patch, xwinclip works as a Windows user would expect.
With a few lines, I've configured xterm and emacs to copy/paste to/from the clipboard:
~/.Xresources:
*VT100.Translations: #override \
Shift <KeyPress> Insert: insert-selection(CLIPBOARD) \n\
Ctrl <KeyPress> Insert: select-set(CLIPBOARD) \n\
~/.emacs:
(global-set-key [S-delete] 'clipboard-kill-region)
(global-set-key [S-insert] 'clipboard-yank)
(global-set-key [C-insert] 'clipboard-kill-ring-save)
Gnome 1&2, Gvim, and KDE 3 works correctly.
I acknow that there is lots of old applications (KDE1&2 mainly) that ignores completely the clipboard, so I will try to rewrite xwinclip as a windows
taskbar app that will allow to copy (at user request) the primary selection to the clipboard and vice versa.
Good bye!