Bug 439513 - Klipper interferes with XWayland: Copying text works only every second time
Summary: Klipper interferes with XWayland: Copying text works only every second time
Status: RESOLVED DUPLICATE of bug 424754
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard (show other bugs)
Version: 5.22.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2021-07-05 11:42 UTC by Anton Kreuzkamp
Modified: 2021-08-04 15:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
org.kde.KWin.supportInformation (7.50 KB, text/plain)
2021-07-05 11:45 UTC, Anton Kreuzkamp
Details
kwin queryWindowInfo for Okular, where the issue appeared (485 bytes, text/plain)
2021-07-05 11:48 UTC, Anton Kreuzkamp
Details
kwin queryWindowInfo for Signal, where no issue appeared (444 bytes, text/plain)
2021-07-05 11:48 UTC, Anton Kreuzkamp
Details
Stout-output of klipper (2.64 KB, text/plain)
2021-07-05 15:21 UTC, Anton Kreuzkamp
Details
Stout-output of klipper (1.50 KB, text/plain)
2021-07-05 15:34 UTC, Anton Kreuzkamp
Details
klipperrc (64 bytes, text/plain)
2021-08-03 23:24 UTC, Anton Kreuzkamp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Kreuzkamp 2021-07-05 11:42:29 UTC
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
Comment 1 Anton Kreuzkamp 2021-07-05 11:45:42 UTC
Created attachment 139864 [details]
org.kde.KWin.supportInformation
Comment 2 Anton Kreuzkamp 2021-07-05 11:47:14 UTC
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.
Comment 3 Anton Kreuzkamp 2021-07-05 11:48:24 UTC
Created attachment 139865 [details]
kwin queryWindowInfo for Okular, where the issue appeared
Comment 4 Anton Kreuzkamp 2021-07-05 11:48:46 UTC
Created attachment 139866 [details]
kwin queryWindowInfo for Signal, where no issue appeared
Comment 5 Anton Kreuzkamp 2021-07-05 15:09:44 UTC
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.
Comment 6 Anton Kreuzkamp 2021-07-05 15:21:00 UTC
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.
Comment 7 Anton Kreuzkamp 2021-07-05 15:34:33 UTC
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.
Comment 8 Vlad Zahorodnii 2021-07-07 12:35:00 UTC

*** This bug has been marked as a duplicate of bug 439070 ***
Comment 9 Anton Kreuzkamp 2021-07-07 14:02:09 UTC
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.
Comment 10 Nate Graham 2021-08-03 23:12:06 UTC
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?
Comment 11 Anton Kreuzkamp 2021-08-03 23:24:17 UTC
Created attachment 140498 [details]
klipperrc

Here is the config of klipper. The bug happens only when IgnoreSelection is set to true.
Comment 12 Anton Kreuzkamp 2021-08-03 23:33:18 UTC
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)
Comment 13 Nate Graham 2021-08-04 15:35:18 UTC
Aha, then this is Bug 424754!

*** This bug has been marked as a duplicate of bug 424754 ***