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
This commit is contained in:
parent
e823ec8488
commit
1794d3c43f
@ -749,6 +749,9 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event)
|
|||||||
desktopMenu.setAttribute(Qt::WA_TranslucentBackground);
|
desktopMenu.setAttribute(Qt::WA_TranslucentBackground);
|
||||||
//end workaround
|
//end workaround
|
||||||
|
|
||||||
|
if (window() && window()->mouseGrabberItem()) {
|
||||||
|
window()->mouseGrabberItem()->ungrabMouse();
|
||||||
|
}
|
||||||
desktopMenu.exec(event->globalPos());
|
desktopMenu.exec(event->globalPos());
|
||||||
event->setAccepted(true);
|
event->setAccepted(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user