Summary: | Clipboard keeps reverting to previous state with QT_QPA_PLATFORM=wayland-egl set | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Joaquim Monteiro <joaquim.monteiro> |
Component: | Clipboard widget & pop-up | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | kdedev, nate, qydwhotmail |
Priority: | NOR | Keywords: | regression |
Version First Reported In: | 6.3.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=502680 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Video of the bug |
Cannot reproduce on Wayland using the exact same settings in the video I turned on debug logging, here's what I found. After copying the word "kde" (and making sure it appears in the clipboard history), the following logs are produced: ``` org.kde.klipper: Checking clip data org.kde.klipper: was empty. Retried, now still empty org.kde.klipper: Checking clip data org.kde.klipper: was empty. Retried, now still empty org.kde.klipper: Checking clip data org.kde.klipper: Synchronize? false org.kde.klipper: Checking clip data org.kde.klipper: Checking clip data org.kde.klipper: was empty. Retried, now still empty org.kde.klipper: Resetting clipboard (Prevent empty clipboard) org.kde.klipper: Checking clip data org.kde.klipper: was empty. Retried, now still empty org.kde.klipper: Resetting clipboard (Prevent empty clipboard) org.kde.klipper: Setting clipboard to < "kde" > org.kde.klipper: Setting selection to < "kde" > ``` If I then copy anything else, I get an infinite loop of the following messages *before* I even move the cursor off the app I'm copying from: ``` org.kde.klipper: Checking clip data org.kde.klipper: was empty. Retried, now still empty org.kde.klipper: Resetting clipboard (Prevent empty clipboard) org.kde.klipper: Setting clipboard to < "kde" > org.kde.klipper: Checking clip data org.kde.klipper: was empty. Retried, now still empty org.kde.klipper: Resetting clipboard (Prevent empty clipboard) org.kde.klipper: Setting selection to < "kde" > ``` At this point, the clipboard still has the new value (not "kde"). After I move the cursor off the app, I get: ``` org.kde.klipper: Checking clip data org.kde.klipper: was empty. Retried, now still empty org.kde.klipper: Resetting clipboard (Prevent empty clipboard) org.kde.klipper: Setting selection to < "kde" > org.kde.klipper: Setting clipboard to < "kde" > ``` And the clipboard reverts to "kde". *** This bug has been marked as a duplicate of bug 502831 *** I discovered what causes this while working on something else. It is not a duplicate of bug 502831. This happens when plasmashell is run with `QT_QPA_PLATFORM=wayland-egl`. Plasma does not set this variable, so the majority of users should be unaffected. Thanks for following up about that! Changing the title to reflect the actual issue |
Created attachment 180024 [details] Video of the bug SUMMARY Clipboard reverts to previous state when focus switches from application to plasma-shell, until the clipboard history is erased. STEPS TO REPRODUCE 1. Copy a piece of text and ensure it gets saved to the clipboard history. 2. Copy something else. 3. Move the mouse to a plasma-shell surface (the desktop, taskbar, clipboard settings window, etc.). 4. Try pasting the text. OBSERVED RESULT The first text (the one saved to the clipboard history) gets pasted. EXPECTED RESULT The text copied second gets pasted. SOFTWARE/OS VERSIONS KDE Plasma Version: 6.3.4 (not a new bug, I'm pretty sure it happened in 6.2, and maybe earlier) KDE Frameworks Version: 6.12.0 Qt Version: 6.9.0 ADDITIONAL INFORMATION This bug **does not happen** if you switch straight from the program you copied from to the program you paste in. The clipboard only reverts to the saved value once focus goes to plasma-shell. See the attached video, it demonstrates all of this.