...
I see a little problem remaining: copy/paste using middle click works ok now, but using keyboard (ctrl-c/ctrl-v) doesn't work correctly if you copy from inside CB to CB itself or any other app.
Do you think it can be solved?
Ok, here's MouseSap005.zip.
http://www.savefile.com/files/1386282We now do a sneak run around wxWidgets in order to preserve both the PRIMARY and CLIPBOARD clipboards.
For Linux: when a window loses focus, the selection is handed off to the GTK PRIMARY clipboard, leaving wxWidgets to handle the normal clipboard.
For windows, if the user middle-clicks inside the selection, it's copied to the clipboard.
For Linux, it's copied to the PRIMARY clipboard.
If the user clicks in an editor, if there is a selection, it's pasted at the current cursor location. If there is no selection, the clipboard text is pasted.
For Linux, same as above, but, if no selection, the PRIMARY is pasted.