Thank you very much wp for your reply. The good news is: in a
separate project does it work, even if I change it to:
procedure TForm1.Button1Click(Sender: TObject);
begin
Picture1:=TPicture.Create;
Picture1.LoadFromFile('Logo_VKM.bmp');
Clipboard.Assign(Picture1);
Picture1.Free;
end;
But in my real project, even if I put these 2 lines directly one after another ('create' and 'free' are separate):
Picture1.LoadFromFile('Logo_VKM.bmp');
Clipboard.Assign(Picture1);
it does
not work: nothing is stored into the Clipboard, but the following message is written to the console:
(png:10977): Gtk-CRITICAL **: 18:17:30.346: IA__gtk_selection_owner_set: assertion 'widget == NULL || gtk_widget_get_realized (widget)' failedVery strange... I fear that I must reduce my real project (5400 lines of code plus many common units) peace by peace, until I see a difference :-((
To do this more constructive / straightforward: does anyone have an idea, what the problem could be? Maybe a Unit of the LCL or FPC which might disturb? Or can someone guess from this console message, where the problem could be:
(png:10977): Gtk-CRITICAL **: 18:17:30.346: IA__gtk_selection_owner_set: assertion 'widget == NULL || gtk_widget_get_realized (widget)' failedAs said, on Windows it works in my real project, only on Linux I have this problem.