Description of problem: On startup, clipboard contents can be pasted to Octave GUI with Ctrl-V shortcut. This stops working after editor's context menu has been opened with right mouse click, or menu from the menu bar has been opened. This happens even if the menu is closed without selecting any option, by clicking somewhere outside the menu. Additionally, on first menu open the Paste option is selectable but does not do anything, but on subsequent menu opens it is greyed out. Happens only if the clipboard is populated from another source than Octave. Copying and pasting from Octave gui back to itself works as it should. Happens only in a Wayland session, XOrg is unaffected. Upstream bug report: https://savannah.gnu.org/bugs/index.php?60356 Version-Release number of selected component (if applicable): 5.2.0-12.fc34 How reproducible: Always Steps to Reproduce: 1. Copy some text to clipboard 2. Start Octave Gui 3. Paste the text with Ctrl-V, observe success 4. Open context menu, select Paste, observe nothing happens 5. Open context menu again, observe Paste is greyed out 6. Close context menu 7. Try pasting with Ctrl-V, observe nothing happens Actual results: Pasting works neither with Ctrl-V nor context menu entry. Expected results: Pasting works as expected. Additional info: Since this only affects Wayland, workaround is to force Qt to X mode: $ QT_QPA_PLATFORM=xcb /usr/bin/octave --gui Perhaps this could even the fix for Fedora, at least until a proper fix is available upstream, since it seems that Octave is not completely ready for Wayland yet.
Relevant discussion on the devel mailing list: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3BVLBS4B3XHJEXFVGD7RK2ZMXZG6JQZT/
I did some more testing. This also happens for many other Qt applications in Fedora. The root cause seems to be that right click pushes an empty string to clipboard. Can be reproduced with Qt 6, so I reported this to Qt issue tracker, too: https://bugreports.qt.io/browse/QTBUG-93474
Reported as a general Qt 5 Wayland bug 1957503, closing as duplicate of that. *** This bug has been marked as a duplicate of bug 1957503 ***