I cannot yet tell under which circumstances this issue arises, it only happens in some windows, but I cannot yet tell the difference. I can only reproduce this with xwayland windows. I could reproduce the issue with firefox, okular and kate running through xwayland, I could not reproduce with kate running as wayland window. It might indeed be an issue with xdg-portals, as Signal, which is running through xwayland from a flatpak, but does afaik not support xdg-portals, does not have this issue. STEPS TO REPRODUCE 1. Start for example Firefox in a plasma wayland session 2. Mark some text, press Ctrl+c to copy 3. paste into krunner or check klipper to see if the text made its way into the clipboard 4. Repeat steps 2 and 3 several times. OBSERVED RESULT It appears, that copying works exactly every second time. EXPECTED RESULT The text should be pasted and displayed in klipper every time. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux, kernel 5.12.13 (64bit) (available in About System) KDE Plasma Version: 5.22.2 KDE Frameworks Version: 5.83.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION
Created attachment 139864 [details] org.kde.KWin.supportInformation
starting firefox with `GTK_USE_PORTAL=0 firefox` (instead of with GTK_USE_PORTAL=1 as I use to) does not prevent this bug to appear with firefox.
Created attachment 139865 [details] kwin queryWindowInfo for Okular, where the issue appeared
Created attachment 139866 [details] kwin queryWindowInfo for Signal, where no issue appeared
copying from Firefox in a Weston-session works fine. The bug disappears when quitting plasmashell and reappears when starting `plasmawindowed org.kde.plasma.clipboard`, so klipper is obviously involved somehow.
Created attachment 139872 [details] Stout-output of klipper Excerpt of the stdout-output of `plasmawindowed org.kde.plasma.clipboard` while copying three times a word from firefox. The first two copies succeeded, the last one failed.
Created attachment 139873 [details] Stout-output of klipper Excerpt of the stdout-output of `plasmawindowed org.kde.plasma.clipboard` while copying four times a word from firefox. The first and second copy succeeded, the third one failed the fourth succeeded. Empty lines and lines starting with hashtag are added by me. The content mentioned in the lines `org.kde.klipper: Setting clipboard to < ... >` is always the content of the clipboard BEFORE, not the copied text.
*** This bug has been marked as a duplicate of bug 439070 ***
This does not seem to be a duplicate of #439070. I can confirm the other one, but while this one is clearly related to Klipper doing things, the other one is not (cf. my comment on #439070). Here the issue appears while copying, there it happens while pasting.
I think I see the issue, or at least something related. Every time I copy something in an XWayland app, two entries are created in Klipper: the text, and a seemingly blank entry. For me this is not interfering with pasting the text, but perhaps for you it is. Can you reproduce this? Also can you please take a screenshot of your Klipper settings?
Created attachment 140498 [details] klipperrc Here is the config of klipper. The bug happens only when IgnoreSelection is set to true.
I don't always see a blank entry appear, but there is always exactly one blank entry floating around in my klipper history (and pasting doesn't work when it's the upper most). The stdout-output of klipper clearly indicates that more than one entry is created (probably afterwards filtered by some duplication removal). The bug only happens with the "Prevent empty clipboard" is activated (above I wrote "only when IgnoreSelection is set", that was by mistake)
Aha, then this is Bug 424754! *** This bug has been marked as a duplicate of bug 424754 ***