From 1794d3c43f9a1b60b1fd24946a865ba43352f50e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 19 Feb 2015 15:11:25 +0100 Subject: [PATCH] ungrab the current grabber before showing the menu forcing the current item to ungrab the mouse before showinf a modal menu ensures the scene mouse state will be coherent and an even won't be lost Change-Id: Icc0a89c437184ea0b87348358827f898ad342f72 --- src/scriptengines/qml/plasmoid/containmentinterface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 44d177866..e68b1dfd4 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -749,6 +749,9 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event) desktopMenu.setAttribute(Qt::WA_TranslucentBackground); //end workaround + if (window() && window()->mouseGrabberItem()) { + window()->mouseGrabberItem()->ungrabMouse(); + } desktopMenu.exec(event->globalPos()); event->setAccepted(true); }