File 0001-Unhide-autohidden-panel-when-using-global-menu.patch of Package plasma5-workspace.7768

From 76b276056e0cb39423cccfd2e429a2d65dea3c06 Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Thu, 21 Sep 2017 00:04:14 +0100
Subject: [PATCH] Unhide autohidden panel when using global menu

Summary:
This sets a transient parent on the shown menus, meaning a panel knows
to stay open whilst it has any menu showing.

We also pulse setStatus() to trigger activating an autohidden panel if
activated via a shortcut.

BUG: 384861

Test Plan:
Ran menu
Using both mouse and keyboard shortcuts navigated a menu
and submenus

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7883
---
 applets/appmenu/lib/appmenuapplet.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/applets/appmenu/lib/appmenuapplet.cpp b/applets/appmenu/lib/appmenuapplet.cpp
index 62b43c90..4560b9e7 100644
--- a/applets/appmenu/lib/appmenuapplet.cpp
+++ b/applets/appmenu/lib/appmenuapplet.cpp
@@ -205,8 +205,16 @@ void AppMenuApplet::trigger(QQuickItem *ctx, int idx)
             actionMenu->installEventFilter(this);
         }
 
+        setStatus(Plasma::Types::AcceptingInputStatus);
+        actionMenu->winId();//create window handle
+        actionMenu->windowHandle()->setTransientParent(ctx->window());
+
         actionMenu->popup(pos);
 
+        //we can return to passive immediately, an autohide panel will stay open whilst
+        //any transient window is showing
+        setStatus(Plasma::Types::PassiveStatus);
+
         if (view() == FullView) {
             // hide the old menu only after showing the new one to avoid brief flickering
             // in other windows as they briefly re-gain focus
-- 
2.14.3

openSUSE Build Service is sponsored by