SUMMARY When Selection and Clipboard synchronization is enabled (i.e. the Ignore selection option is NOT enabled), text selection in GTK (or, possibly, PyGTK) application spuriously gets reset sometimes. STEPS TO REPRODUCE 1. In the Clipboard widget settings, General tab, make sure "Prevent empty clipboard" is enabled and "Ignore selection" is disabled. 2. Open a GTK application. I use Meld. In it, create a blank text file comparison or initiate comparison of two text files. I've also seen this problem in Sublime Text editor. 3. In the application, select a piece of text with mouse. Try multiple times, if needed. OBSERVED RESULT The selection gets reset sometimes. Possibly, this happens when the widget automatically copies the selection to the clipboard. EXPECTED RESULT The selection should stay. SOFTWARE/OS VERSIONS Linux: Kubuntu 20.04 KDE Plasma Version: 5.18.4 KDE Frameworks Version: 5.68.0 Qt Version: 5.12.8 ADDITIONAL INFORMATION The workaround is to enable the "Ignore selection" option in the widget settings.
Cannot reproduce with Meld, Gedit, Firefox or Thunderbird. I haven't managed to ever make the selection get reset. Are you still experiencing this? Is Meld installed from distro packages, out of curiosity, or is it a Flatpak, Snap, or AppImage app?
(In reply to Nate Graham from comment #1) > Cannot reproduce with Meld, Gedit, Firefox or Thunderbird. I haven't managed > to ever make the selection get reset. > > Are you still experiencing this? Yes, easily reproducible in Meld for me. Freshly booted system, went in Clipboard settings, disabled "Ignore selection", started Meld with blank file diff, typed some text and tried selecting it with mouse. I suspect that selection clearing on copying to clipboard is a GTK feature/bug, since when "Ignore selection" is enabled and I copy selection with a hotkey (Ctrl+Ins), the selection gets cleared. Happens 100% in Meld. But at least I'm able to select text before the selection is cleared. > Is Meld installed from distro packages, out > of curiosity, or is it a Flatpak, Snap, or AppImage app? Yes, it's installed from Kubuntu .deb packages. Operating System: Kubuntu 20.10 KDE Plasma Version: 5.19.5 KDE Frameworks Version: 5.74.0 Qt Version: 5.14.2 Kernel Version: 5.8.0-44-lowlatency OS Type: 64-bit Processors: 8 × Intel® Core™ i7-2600K CPU @ 3.40GHz Memory: 15.6 GiB of RAM Graphics Processor: GeForce RTX 2080 Ti/PCIe/SSE2
Weird. I just tried again with a blank diff, copying the text with Ctrl+Ins just like you said, and the text is not cleared. Regardless, nothing in Klipper itself or any KDE software is capable of clearing text in a GTK app, so I would recommend following up with Meld developers, or perhaps the GTK developers of nothing bears fruit over there. At this point I suspect a bug in Meld, which is going to be a somewhat old version at this point. It's possible it's been fixed in a newer one. Thanks for the info!