Here is a follow-up. I wrote a simple test using LCL Gtk2 and gtk_clipboard_store. This test allows the clipboard data to persist after my program exited. Button1 click sets the clipboard data. If Button2 clicked the data will persist after the program exits. If Button2 is not clicked, the data does not persist. Curiously, as the LCL Gtk2 currently stands, gtk_clipboard_store() does not work. I suspect the LCL is not using the same GdkAtom clipboard as returned by gtk_clipboard_get(GDK_SELECTION_CLIPBOARD).
uses Gtk2, Gdk2; { TForm1 } procedure TForm1.Button1Click(Sender: TObject); var S: string; begin S := Edit1.Text; gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), PChar(S), Length(S)) end; procedure TForm1.Button2Click(Sender: TObject); begin gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD)); end; procedure TForm1.Button3Click(Sender: TObject); begin Close; end; >
-- _______________________________________________ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus