Check for isVisible() instead of isNativeMenuBar() to make global menu hack work with appmenu-qt5, follow-up fix for #271

This commit is contained in:
Janek Bevendorff 2017-02-14 16:01:14 +01:00
parent 7a344930ec
commit 5bb6c4d9e4

View File

@ -745,7 +745,8 @@ void MainWindow::toggleWindow()
// re-register global D-Bus menu (needed on Ubuntu with Unity)
// see https://github.com/keepassxreboot/keepassxc/issues/271
// and https://bugreports.qt.io/browse/QTBUG-58723
if (m_ui->menubar->isNativeMenuBar()) {
// check for !isVisible(), because isNativeMenuBar() does not work with appmenu-qt5
if (!m_ui->menubar->isVisible()) {
QDBusMessage msg = QDBusMessage::createMethodCall(
"com.canonical.AppMenu.Registrar",
"/com/canonical/AppMenu/Registrar",