Bug 399975

Summary: LyX does not work well with global menu
Product: [Plasma] plasmashell Reporter: Cor Blom <cornelis>
Component: Global MenuAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: nate, plasma-bugs
Priority: NOR    
Version: 5.14.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=401725
Latest Commit: Version Fixed In: 5.14.4
Sentry Crash Report:

Description Cor Blom 2018-10-18 10:32:14 UTC
SUMMARY
The bugreport as the side of LyX can be found here:

https://www.lyx.org/trac/ticket/11130

The global menu is working somewhat with the active window plasmoid, but with the the global menu of plasma itself it is not working. The menu shows, but does not open (or opens so fast that it is hardly seen).

In the bugreport from Lyx one of the developpers offered to explain how Lyx's menus work. Maybe a solution can be found?



SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.41.0
KDE Frameworks Version: 5.50
Qt Version: 5.11.2

ADDITIONAL INFORMATION
Comment 1 Christoph Feck 2018-11-08 22:56:01 UTC
From upstream ticket (LyX developer):

> I have to say that we play dirty tricks with our menus, which are generated on-the-fly just before opening them.

I remember we had a similiar issue with other menus, but cannot find the ticket.
Comment 2 Kai Uwe Broulik 2018-11-19 09:08:38 UTC
Git commit 73339208cd3469e37eb0ef5555e3de5544cb0a8e by Kai Uwe Broulik.
Committed on 19/11/2018 at 09:07.
Pushed by broulik into branch 'Plasma/5.14'.

[DBusMenuImporter] Don't call removeAction() to avoid an empty QMenu

As soon as QMenu becomes empty it is closed. This can happen when the application completely reloads its menu.
Instead, call deleteLater which will destroy the QAction later at which point it is automatically removed from the menu.
FIXED-IN: 5.14.4

CHANGELOG: Fixed global menu misbehaving and unexpectedly closing with certain applications

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

M  +3    -1    libdbusmenuqt/dbusmenuimporter.cpp

https://commits.kde.org/plasma-workspace/73339208cd3469e37eb0ef5555e3de5544cb0a8e
Comment 3 Cor Blom 2018-11-24 22:58:27 UTC
Thanks for fixing this.

Can the fix also be applied to the Active Window Control applet? It has the same code.

Maybe this is not the right place to ask, but I do not know how else to do this.