Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » Strange behavior of clipboard in TheIde 609-dev1 on Linux
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux [message #5495 is a reply to message #5348] |
Wed, 27 September 2006 13:31 |
nicomesas
Messages: 104 Registered: September 2006 Location: Barcelona, Spain
|
Experienced Member |
|
|
Today I have downloaded the 609-dev3, I compiled theIde and the clipboard problem persist.
Well, the problem is:
1) If I make Copy in a U++ App, the copied text does not paste in another application (for example gedit).
2) The same it happens the other way around. A text copied in gedit does not paste in a U++ app.
3) Nevertheless the text copied in U++app if one paste in that same app.
4) If I run a U++app and I don't do copy, then if I do Paste... Yes! app gets the Clipboard contents
I take all the morning watching how to solve this. I have watched in the source code of the GTK to see if it clarified my ideas. Also I have sailed by the QClipboard class of the QT and believe that I have sunk still more.
When I have downloaded the source of XFree86 to see some example, then my head explotes.
Nevertheless I have removed something in clear. This reference has clarified enough to the subject http://standards.freedesktop.org/clipboards-spec/clipboards- latest.txt
Hey, I consider I am a good C++ programmer but this exceeds my capacity, so I have resorted to the true-very-old method of the test-error.
At end I believe to have found the one solution quite simple, although the reasoning to arrive at her is intuitive or rather magician.
In the CtrlCore/X11lip.cpp file comment line 25.
void Ctrl::Xclipboard::Write(int fmt, const String& _data)
{
LLOG("SetSelectionOwner " << XAtomName(fmt));
data.GetAdd(fmt) = _data;
// if(XGetSelectionOwner(Xdisplay, XAtom("CLIPBOARD") != win)) <--this line out
XSetSelectionOwner(Xdisplay, XAtom("CLIPBOARD"), win, CurrentTime);
}
When doing this "I believe" that what happens is that updates (somehow) who made Copy for the last time in the system.
Also comment lines 65 and 66....
String Ctrl::Xclipboard::Read(int fmt)
{
// if(data.GetCount())
// return data.Get(fmt, Null);
XConvertSelection(Xdisplay, XAtom("CLIPBOARD"), fmt, XAtom("CLIPDATA"), win, CurrentTime);
XFlush(Xdisplay);
XEvent event;
When doing this "I believe" that what happens is that makes the request standard to see who has the last copy in clipboard. Of this form its own internal buffer is only used in the Request function although is she herself that made Copy the last time.
And now it seems that everything works.
Nico
|
|
|
|
|
Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: nicomesas on Fri, 15 September 2006 17:59
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: mirek on Fri, 15 September 2006 21:38
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: nicomesas on Sat, 16 September 2006 16:20
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: mirek on Sat, 16 September 2006 16:33
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: nicomesas on Sat, 16 September 2006 16:43
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: guido on Sat, 16 September 2006 18:46
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: mirek on Sat, 16 September 2006 18:54
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: nicomesas on Wed, 27 September 2006 13:31
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: mirek on Wed, 27 September 2006 13:43
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: nicomesas on Wed, 27 September 2006 13:57
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: mirek on Wed, 27 September 2006 14:08
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: nicomesas on Wed, 27 September 2006 14:26
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: nicomesas on Wed, 27 September 2006 14:54
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: mirek on Fri, 29 September 2006 15:06
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: mirek on Wed, 04 October 2006 11:48
|
|
|
Re: Strange behavior of clipboard in TheIde 609-dev1 on Linux
By: mirek on Sat, 14 October 2006 13:49
|
Goto Forum:
Current Time: Thu Apr 18 07:01:22 CEST 2024
Total time taken to generate the page: 0.01383 seconds
|