summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2017-02-06 12:37:47 (GMT)
committerKai Uwe Broulik <kde@privat.broulik.de>2017-02-06 12:37:47 (GMT)
commitbcb9ede5caabac3d5086dbcdcccfd7bc44211704 (patch)
tree33261fde66dde6a61f3c7412f4b24989f21311cb
parentb0b31dee60defe4d7e9de8abc1dbbadfbced2783 (diff)
[System Tray Containment] Ungrab mouse before opening context menu
This is the same Plasma ContainmentInterface does. Otherwise QtQuick gets confused about mouse state. Differential Revision: https://phabricator.kde.org/D4455
-rw-r--r--applets/systemtray/systemtray.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/applets/systemtray/systemtray.cpp b/applets/systemtray/systemtray.cpp
index b9c88a2..8e16fa4 100644
--- a/applets/systemtray/systemtray.cpp
+++ b/applets/systemtray/systemtray.cpp
@@ -163,6 +163,10 @@ void SystemTray::showPlasmoidMenu(QQuickItem *appletInterface, int x, int y)
connect(this, &QObject::destroyed, desktopMenu, &QMenu::close);
desktopMenu->setAttribute(Qt::WA_DeleteOnClose);
+ if (appletInterface->window() && appletInterface->window()->mouseGrabberItem()) {
+ appletInterface->window()->mouseGrabberItem()->ungrabMouse();
+ }
+
emit applet->contextualActionsAboutToShow();
foreach (QAction *action, applet->contextualActions()) {
if (action) {