I am very confident that the X11 behaviour is that the data goes with the 
application. It might be that more recent desktops/toolkits have some work 
around, but the gtk2 functions lazarus uses only copy data externally when 
asked for by an X11 messaage and this is all gtk2 provides.

Colin


> On 01/04/2021 08:26 Anthony Walter via lazarus 
> <lazarus@lists.lazarus-ide.org> wrote:
> 
> 
> I noticed a recent discussion touching on this problem posted by Bo Berglund 
> on November 20, 2020 to this same mailing list.
> 
> Andreas Schneider replied in that thread, 'Pasting basically asks the 
> application that "copied" it to get the content. If that app is gone in the 
> meantime, there's nothing to paste anymore.'
> 
> Also, Colin Western replied this is how Linux applications work, 'the data is 
> kept with the source program, so goes when the program closes'.
> 
> I disagree.
> 
> I've tested several Gtk2 applications, including older versions of Gimp and 
> Geany. Both these programs have clipboard copy functions and the data on the 
> clipboard from those applications my tests show their clipboard data persists 
> after they have been closed. So it would seem that Gtk2 the clipboard works 
> correctly and handles persisting data after an application has exited.
> 
> I stepped through the LCL source and it looks like the clipboard code is 
> using some Gtk clipboard functions, and not using X windows functions, 
> thereby introducing a possible problem, but I am unsure if the LCL is using 
> the Gtk clipboard correctly. That is, the LCL might be using some Gtk 
> clipboard functions which seem to work well, but exhibit the problematic 
> behaviour I've described.
> -- _______________________________________________ lazarus mailing list 
> lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to