Bug 1957503

Summary: Right click empties the clipboard on Qt 5 applications
Product: [Fedora] Fedora Reporter: Otto Liljalaakso <otto.liljalaakso>
Component: qt5-qtwaylandAssignee: Jan Grulich <jgrulich>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 34CC: jgrulich, jreznik, kde-sig, lkundrak, pierluigi.fiorini, rdieter, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qt5-qtwayland-5.15.2-14.fc34 qt5-qtwayland-5.15.2-14.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-19 15:59:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1965576    

Description Otto Liljalaakso 2021-05-05 21:41:39 UTC
Description of problem:

When using Gnome on Wayland, right click empties the clipboard. Only happens when the clipboard was filled from different application than the target.

The clipboard still has its original content visible for other applications, and can be made work again for the Qt application as well by moving it out of focus and back in.
Version-Release number of selected component (if applicable):

How reproducible:

Always on Octave, KeePassXC and an artificial minimal reproducer

Steps to Reproduce:
1. Open a Qt 5 application, for example Octave
2. Copy some text to clipboard from another application
3. Paste it to the Qt 5 application with Ctrl-V, observe success
4. Right click on the Qt 5 application
5. Attempt Ctrl-V paste again

Actual results:
Nothing happens

Expected results:
Copied text is pasted to the Qt 5 application

Additional info:
Report in Qt tracker: https://bugreports.qt.io/browse/QTBUG-93474
Minimal reproducer: https://gitlab.com/Urpelainen/qt-clipboard-rightclick-reproducer

Comment 1 Otto Liljalaakso 2021-05-05 21:44:06 UTC
*** Bug 1954181 has been marked as a duplicate of this bug. ***

Comment 2 Jan Grulich 2021-07-16 11:05:32 UTC
Potential fix for this issue: https://codereview.qt-project.org/c/qt/qtwayland/+/360355

Comment 3 Otto Liljalaakso 2021-07-16 16:22:30 UTC
Amazing, thank you for working on this Jan!

Comment 4 Jan Grulich 2021-08-30 09:31:21 UTC
My fix is waiting for https://codereview.qt-project.org/c/qt/qtwayland/+/367306 to land. Then I will try to backport both to Fedora.

Comment 5 Fedora Update System 2021-10-04 08:28:25 UTC
FEDORA-2021-0ce5eda810 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-0ce5eda810

Comment 6 Fedora Update System 2021-10-04 08:28:27 UTC
FEDORA-2021-379eb8a86c has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-379eb8a86c

Comment 7 Fedora Update System 2021-10-04 18:42:12 UTC
FEDORA-2021-379eb8a86c has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-379eb8a86c

Comment 8 Fedora Update System 2021-10-04 18:42:22 UTC
FEDORA-2021-0ce5eda810 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-0ce5eda810

Comment 9 Fedora Update System 2021-10-05 01:31:07 UTC
FEDORA-2021-379eb8a86c has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-379eb8a86c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-379eb8a86c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2021-10-05 15:16:14 UTC
FEDORA-2021-0ce5eda810 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-0ce5eda810`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-0ce5eda810

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2021-10-19 15:59:04 UTC
FEDORA-2021-379eb8a86c has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2021-10-29 22:56:22 UTC
FEDORA-2021-0ce5eda810 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.