Bug 375053 - enabling global menu breaks copy/paste shortcuts in qupzilla
Summary: enabling global menu breaks copy/paste shortcuts in qupzilla
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu (show other bugs)
Version: 5.8.95
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-14 18:20 UTC by Antonio Rojas
Modified: 2018-01-29 17:57 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.11.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2017-01-14 18:20:24 UTC
Not sure if this is actually a global menu issue of it's just triggering a bug in Qupzilla.
Enabling the global menu (either in the window title or as an applet) breaks the CTRL+C/CTRL+V shortcuts in Qupzilla: trying to copy or paste text on any website gives an error
"The key sequence 'Ctrl+C' is ambiguous. Use 'Configure Shortcuts'
from the 'Settings' menu to solve the ambiguity.
No action will be triggered."

Disabling the global menu makes it work again
Comment 1 David Edmundson 2017-01-26 16:28:41 UTC
I did try installing qupzilla. For me copy and paste still worked.
Comment 2 Antonio Rojas 2017-01-28 10:07:44 UTC
I can still reproduce it with a clean user. 
Qupzilla 2.0.2, Qt 5.8.0, Frameworks 5.30, es_ES.utf8 locale
Comment 3 Antonio Rojas 2017-02-14 07:53:09 UTC
Fixed with Frameworks 5.31
Comment 4 David Rosca 2017-02-22 19:09:25 UTC
It's not fixed. The problem is that the QMenu's don't receive aboutToHide signals when global menu is enabled (at least with global menu in window titlebars).

I didn't look into global menu code, so this may also be bug in Qt.
Comment 5 David Edmundson 2017-02-24 03:07:22 UTC
Why would that break control+C actions?
Comment 6 David Rosca 2017-02-24 08:26:45 UTC
Because it disables those actions in aboutToShow, and when the aboutToShow is not called, these actions are duplicated and it results in that warning dialog.

Also, why is the dialog shown in Qt-only application?
Comment 7 Vladyslav Tronko 2017-03-17 06:09:33 UTC
I confirm this.
Comment 8 Michael D 2017-03-25 20:58:52 UTC
Does this relate to the fact that global menu breaks shortcuts in a variety of qt applications, including VLC and Sayonara?
Comment 9 David Edmundson 2017-03-29 15:35:47 UTC
Git commit c24ae6602b0d01cb629e17c4789cecf8c15bd048 by David Edmundson.
Committed on 29/03/2017 at 15:35.
Pushed by davidedmundson into branch 'Plasma/5.9'.

Connect aboutToHide signal from QMenu to relevant libdbusmenu-qt slot

Summary:
This sends the close event to the client which then sends aboutToHide to
the QMenu.

Code was all there, just not hooked up

Test Plan: Added qDebug to the test app inside libdbusmenuqt

Reviewers: #plasma, markg, broulik

Reviewed By: #plasma, markg, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5192

M  +1    -0    libdbusmenuqt/dbusmenuimporter.cpp

https://commits.kde.org/plasma-workspace/c24ae6602b0d01cb629e17c4789cecf8c15bd048
Comment 10 Antonio Rojas 2017-03-29 15:55:41 UTC
This commit doesn't fix the problem
Comment 11 Antonio Rojas 2017-05-03 22:36:42 UTC
Seems to be fixed for real with Qt 5.9
Comment 12 David Rosca 2017-05-04 08:16:44 UTC
> Seems to be fixed for real with Qt 5.9

I don't think so. Maybe the behavior of ambiguous shortcuts were changed in Qt 5.9, but the root issue with appmenu is still there.

This fixes this issue: https://phabricator.kde.org/D5705
Comment 13 Mykola Krachkovsky 2017-07-14 10:50:37 UTC
Bug still present.
openSUSE Tumbleweed x86_64, Qt 5.9.1, KDE Plasma 5 with global menu on.

As workaround I'm using `KDE_NO_GLOBAL_MENU=1 qupzilla` to start it.
Comment 14 David Rosca 2017-07-25 19:17:15 UTC
Git commit dba0f80288b41e385f6a358f325b6b05d8ae11c4 by David Rosca.
Committed on 25/07/2017 at 15:25.
Pushed by drosca into branch 'master'.

AppMenu: Don't call AboutToShow on LayoutUpdated

This workaround breaks applications that rely on aboutToShow/aboutToHide
signals, because it sends aboutToShow to all menus on startup without actually
the menu being opened.
FIXED-IN: 5.11.0

Differential Revision: https://phabricator.kde.org/D5705

M  +0    -43   appmenu/menuimporter.cpp
M  +0    -3    appmenu/menuimporter.h

https://commits.kde.org/plasma-workspace/dba0f80288b41e385f6a358f325b6b05d8ae11c4
Comment 15 acidrums4 2017-12-25 15:28:45 UTC
Though it's been marked resolved, I can still reproduce this, despite using plasma-workspace-5.11.4, Qupzilla 2.2.3 and Qt 5.9.3 (on a Gentoo amd64 box).

The `KDE_NO_GLOBAL_MENU=1 qupzilla` did worked for me, though.
Comment 16 Antonio Rojas 2017-12-25 20:49:24 UTC
Still valid
Comment 17 acidrums4 2018-01-19 19:04:43 UTC
Weirdly enough, this was solved for me with today's update on Qupzilla (2.2.4). It feels like Global Menu wasn't the only one to blame...
Comment 18 David Rosca 2018-01-19 19:07:08 UTC
It is still to blame, but I just changed the behavior in QupZilla that triggered this bug.
So you should not have this issue anymore, but global menu is still broken - it incorrectly sends aboutToShow/aboutToHide events (on the Qt side).
Comment 19 Alexander Mentyu 2018-01-29 17:54:54 UTC
Can't reproduce in:

Plasma: 5.11.5
Apps: 17.12.1
Qt: 5.10.0
Frameworks: 5.42.0
Kernel: 4.14.14-1-MANJARO
QupZilla 2.2.4
Comment 20 David Rosca 2018-01-29 17:57:14 UTC
Alright, as far as this bug is concerned, it actually was fixed.