Skip to content
Commit 14a546e5 authored by David Edmundson's avatar David Edmundson
Browse files

Use DBusMenu if available

Summary:
This is part one in a series to restore global menu support in Plasma.

Since we inherit from QPlatformTheme we do not get the global menu
support for free like Qt's own platform themes inheriting from
QGenericUnixTheme would, hence the use of private headers. It includes a
fork of Qt's QDBusMenuBar to give us access to some of its properties
(the window it's operating on and the object path). This requires
relicensing of Plasma-Integration to LGPL3.

To support Wayland instead of relying on window IDs alone, we set the
DBus service name and object path where the menu is as window properties
which KWin or any other interested party could read. This way this code
becomes completely window ID agnostic and since all the boilerplate
(emit layout changed and what not) is in the client, we wouldn't even
really need the registrar anymore.

To facilitate keyboard navigation, long-pressing Alt will request the
application to open the menu, and then either KWin will trigger the
window title bar button or the application menu applet will do
something.

Test Plan:
* checkDBusGlobalMenuAvailable() et al are from Qt's upstream
* QDBusMenuBar is also from Qt
* requires Qt 5.7

Co-Authored with Kai Uwe Broulik

Reviewers: broulik, #plasma

Reviewed By: broulik, #plasma

Subscribers: huber, dmitryshachnev, graesslin, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3085
parent 102551b7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment