Use DBusMenu if available

Authored by davidedmundson on Jan 11 2017, 1:28 PM.

Description

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

Details

Committed
davidedmundsonJan 11 2017, 1:29 PM
Reviewer
Plasma
Differential Revision
D3085: Use DBusMenu if available
Parents
R135:102551b7debb: Enable blurBehind effect if the window hints for it
Branches
Unknown
Tags
Unknown