Subject: mailing-list for TeXmacs Users
List archive
From : David Allouche <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] Cut and paste in KDE 4
- Date: Wed, 21 Jan 2009 23:02:19 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=MExJtg1F6JqbeSpcE4Qw65/ljbeUQuQgc50P4wYLa4kKFrhMqzXvw0XBjoMYGFzIwd kXEtv+DfMbegPO3KQSPHqRaGlq82fkWpmQvYfgghUFBCEPxRBXy2HXiEBXCIt1mlzELM dQLbjw8WzIaHUeYBoNCiJEBTtpH6iN8J9eneA=
On Wed, Jan 21, 2009 at 20:02, Norbert Nemec <address@hidden> wrote:
> Cut and paste certainly is confusing. I spent a few minutes sorting through
> the current state of affairs, but I didn't get far.
>
> For anyone who wants to look into it, a good starting point seems to be:
>
> http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki
>
> I think this is the behavior TeXmacs should aim at as well. Does the current
> code already try to implement this standard? In that case, it seems to be
> buggy in some details, but it is hard to sort through the strange behavior
> in various situations, interacting with various other clients...
Here is a tentative patch.
I could not test it because any attempt to run a from-source build of
texmacs gives me the "Fatal error: Tex seems not to be installed
properly in 'load_tex'". Of course, I have a texmacs package
installed, so I have all the runtime dependencies. Running Ubuntu
Intrepid.
At least, it compiles.
Index: src/Plugins/X11/x_gui.cpp
===================================================================
RCS file: /texmacs/src/src/Plugins/X11/x_gui.cpp,v
retrieving revision 1.9
diff -U3 -r1.9 x_gui.cpp
--- src/Plugins/X11/x_gui.cpp 13 Oct 2008 16:54:39 -0000 1.9
+++ src/Plugins/X11/x_gui.cpp 21 Jan 2009 21:58:43 -0000
@@ -219,13 +219,14 @@
return true;
}
if (key != "primary") return false;
- if (XGetSelectionOwner (dpy, XA_PRIMARY) == None) return false;
+ Atom clipboard= XInternAtom (dpy, "CLIPBOARD", false);
+ if (XGetSelectionOwner (dpy, clipboard) == None) return false;
if (is_nil (windows_l)) return false;
Window win= windows_l->item;
x_window x_win= (x_window) Window_to_window[win];
Atom data= XInternAtom (dpy, "MY_STRING_SELECTION", false);
- XConvertSelection (dpy, XA_PRIMARY, XA_STRING, data, win, CurrentTime);
+ XConvertSelection (dpy, clipboard, XA_STRING, data, win, CurrentTime);
int i;
XEvent ev;
@@ -263,8 +264,9 @@
if (is_nil (windows_l)) return false;
Window win= windows_l->item;
if (selection!=NULL) delete[] selection;
- XSetSelectionOwner (dpy, XA_PRIMARY, win, CurrentTime);
- if (XGetSelectionOwner(dpy, XA_PRIMARY)==None) return false;
+ Atom clipboard= XInternAtom (dpy, "CLIPBOARD", false);
+ XSetSelectionOwner (dpy, clipboard, win, CurrentTime);
+ if (XGetSelectionOwner(dpy, clipboard)==None) return false;
selection= as_charp (s);
}
return true;
- [TeXmacs] Cut and paste in KDE 4, Bas Spitters, 01/20/2009
- Re: [TeXmacs] Cut and paste in KDE 4, Javier Arantegui, 01/21/2009
- Re: [TeXmacs] Cut and paste in KDE 4, Joris van der Hoeven, 01/21/2009
- Re: [TeXmacs] Cut and paste in KDE 4, Norbert Nemec, 01/21/2009
- Re: [TeXmacs] Cut and paste in KDE 4, David Allouche, 01/21/2009
- Re: [TeXmacs] Cut and paste in KDE 4, Norbert Nemec, 01/21/2009
- [TeXmacs] Patch: Cut and paste in KDE 4, Norbert Nemec, 01/22/2009
- Re: [TeXmacs] Patch: Cut and paste in KDE 4, Joris van der Hoeven, 01/22/2009
- [TeXmacs] Patch: Cut and paste in KDE 4, Norbert Nemec, 01/22/2009
- Re: [TeXmacs] Cut and paste in KDE 4, Norbert Nemec, 01/21/2009
- Re: [TeXmacs] Cut and paste in KDE 4, David Allouche, 01/21/2009
- Re: [TeXmacs] Cut and paste in KDE 4, Norbert Nemec, 01/21/2009
Archive powered by MHonArc 2.6.19.