Recent

Author Topic: Again: Empty gtk2 clipboard on exit  (Read 339 times)

winni

  • Sr. Member
  • ****
  • Posts: 415
Again: Empty gtk2 clipboard on exit
« on: November 01, 2019, 10:51:42 pm »
Hallo!

 Empty gtk2 clipboard on exit. This is a long story, I know. The gtk2  crew noticed this error with "won't fix".

So I was happy to find this workaround from dbannon:
https://wiki.lazarus.freepascal.org/Clipboard#How_to_fix_empty_GTK2_clipboard_on_exit

But: Both versions did not work, not the unit-version and not the FormClose-Version.

My question: is there a new workaround???
Or any suggestions?

Thanx Winni



lucamar

  • Hero Member
  • *****
  • Posts: 2075
Re: Again: Empty gtk2 clipboard on exit
« Reply #1 on: November 01, 2019, 11:13:00 pm »
The underlying problem is that the Linux clipboard is (usually) ephimerous so it doesn't survive (i.e. it's not "fixed") unless it's pasted somewhere.

There is most probably something else but AFAICT the only really safe "workaround" is to paste the clipboard into another application or make the system believe you have done so, which is somewhat difficult to achieve.

But I'm not really an expert in Unices's clipboard operations so I may be completely wrong. :-[
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

winni

  • Sr. Member
  • ****
  • Posts: 415
Re: Again: Empty gtk2 clipboard on exit
« Reply #2 on: November 03, 2019, 06:33:01 pm »
Hi!

Empty gtk2 clipboard on exit:

No ideas or suggestions for a workaround????

Why does the workaround from dbannon not work??

Winni

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3644
  • I like bugs.
Re: Again: Empty gtk2 clipboard on exit
« Reply #3 on: November 03, 2019, 08:54:37 pm »
No ideas or suggestions for a workaround????
Modern desktop systems have support for permanent clipboard and usually enhance it by providing a history list.
KDE here has a nice taskbar applet, I believe Gnome has a similar one.
The lighter desktops may have additions that can be installed afterwards.
Which desktop do you use?

winni

  • Sr. Member
  • ****
  • Posts: 415
Re: Again: Empty gtk2 clipboard on exit
« Reply #4 on: November 03, 2019, 10:02:19 pm »
Hi!

Thanx - I know the ways to get around that bug. Yes, KDE delivers the clipboard history in a mini applet. Once it was called Klipper. Don't know the name now because with every KDE Version they invent the wheel again .....

I am just bothered that I  finish my app and the default clipboard is gone. So I was happy that I found the workaround from dbannon. But for whatever reasons it does not work.

So I ask for the reason an a new workaround.

But anyway - thanks for the hints.

Winni