bugGNU Octave - Bugs: bug #60356, GUI: Paste with Ctrl-V disable...

 
 

bug #60356: GUI: Paste with Ctrl-V disable after opening context menu

Submitter:  None
Submitted:  Wed 07 Apr 2021 06:42:06 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Otto Urpelainen Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 6.2.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 19 Dec 2021 01:58:19 PM UTC, comment #11: 

Just for the record,
the qtwayland bug that caused this has been fixed:

https://bugreports.qt.io/browse/QTBUG-93474

Otto Urpelainen <oturpe>
Fri 30 Apr 2021 07:29:29 PM UTC, comment #10: 

I wasn't able to start Octave with Wayland myself, I always got the message that Wayland is ignored. However, thank you very much for digging that deep into the issue.

Closing the bug as invalid.

Torsten Lilge <ttl>
Group Member
Fri 30 Apr 2021 06:31:38 PM UTC, comment #9: 

This bug can be closed. The problem is that Fedora has patched Qt 5 to default to Wayland on Gnome, which Qt 5 does not normally do due to problems like this. The fix has to happen in Fedora.

See this message on Fedora devel list for more info:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3BVLBS4B3XHJEXFVGD7RK2ZMXZG6JQZT/

Unfortunately I submitted this bug before I created by Savannah account, so I am unable to close the bug myself.

Otto Urpelainen <oturpe>
Tue 27 Apr 2021 06:01:36 PM UTC, comment #8: 


comment #7:

> Ah, this might be the reason why I was not able to confirm this yet; I am using Gnome on XOrg. I will try Wayland the next days.


Thank you Torsten! I have been trying to debug this myself, but progress is very slow because I did not have any previous experience with either Octave or Qt.

Anyhow, now that I discovered that Wayland is involved, I also came up with a workaround: Force Qt to use XOrg like this:

    $ QT_QPA_PLATFORM=xcb /usr/bin/octave --gui

XWayland must be installed, which is the case for Fedora.

Also, using debug printing, I found out that the clipboard is emptied during this call in QTerminal::handleCustomContextMenuRequested:

    _contextMenu->exec (mapToGlobal (at));

Otto Urpelainen <oturpe>
Tue 27 Apr 2021 05:28:33 PM UTC, comment #7: 

Ah, this might be the reason why I was not able to confirm this yet; I am using Gnome on XOrg. I will try Wayland the next days.

Torsten Lilge <ttl>
Group Member
Tue 27 Apr 2021 03:03:49 PM UTC, comment #6: 

Still one more interesting discovery: This seems to be related to Wayland. Fedora uses Wayland by default, if I launch an X session instead, this bug disappears.

Otto Urpelainen <oturpe>
Sun 25 Apr 2021 05:41:39 PM UTC, comment #5: 

One more detail about this bug: Text copied from Octave itself can be pasted using the context menu, and opening the menu does not prevent further copying either.

Otto Urpelainen <oturpe>
Fri 09 Apr 2021 05:38:36 AM UTC, comment #4: 

I tested the menu on the top of the window also. "Edit"->"Paste" is always greyed out, even if there is text on the clipboard and Ctrl-V worked just before opening the menu. Also, opening any of the top menus disables paste just like opening the context menu does.

Otto Urpelainen <oturpe>
Thu 08 Apr 2021 08:03:05 PM UTC, comment #3: 

Then the context menu seems to disable the "paste"-action (for whatever reason). I assume that the menu entry "Edit"->"Paste" in the main window is also grayed out after the issue occurred?

Torsten Lilge <ttl>
Group Member
Thu 08 Apr 2021 07:28:15 PM UTC, comment #2: 

The problem affects both console and editor widget.

When I was testing that, I also discovered that the situation can be reverted simply by copying text to clipboard again. As if the clipboard was emptied when the context menu is opened. But the clipboard is not actually empty, because the original text can still be pasted to other application than Octave.

I tried Octave from Ubuntu 20.04 repositories as well. That worked just fine.

Perhaps this is a Fedora problem actually, if other distributions do not suffer from this?

Otto Urpelainen <oturpe>
Thu 08 Apr 2021 05:15:11 PM UTC, comment #1: 

Thank you for the report. I can not reproduce this with a recent build of the stable branch (6.2.1) on Debian. Are you pasting into the console or editor widget? Does it make a difference?

Torsten Lilge <ttl>
Group Member
Wed 07 Apr 2021 06:42:06 PM UTC, original submission:  

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. 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.

Release: 6.2.0, tested that this happens also on 5.2.0.
Environment: Fedora 34 Beta, Fedora 33
Build: Happens with Octave 5.2.0 installed from package repositories of both tested Fedora versions, and also with Octave that is locally built from 5.2.0 and 6.2.0 tarballs from Octave download page.

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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by opoplawski
  • -email is unavailable- added by oturpe (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-30 ttl StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2021-04-28 opoplawski Carbon-Copy- Added opoplawski

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code