diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-12-17 07:51:53 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-01-04 14:18:25 (GMT) |
commit | 91a438cad2139ae33f8a18c8ca8f81a41795ebe9 (patch) | |
tree | 3961b036eaabb8bbd938a24896af89f41e0706f1 /src/gui/kernel | |
parent | 683263e4010e3e1797221edb73d91471aea7b93a (diff) | |
download | Qt-91a438cad2139ae33f8a18c8ca8f81a41795ebe9.zip Qt-91a438cad2139ae33f8a18c8ca8f81a41795ebe9.tar.gz Qt-91a438cad2139ae33f8a18c8ca8f81a41795ebe9.tar.bz2 |
Add basic mouse context menues to lighthouse
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_qpa.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp index a587e8e..a164c2d 100644 --- a/src/gui/kernel/qapplication_qpa.cpp +++ b/src/gui/kernel/qapplication_qpa.cpp @@ -735,7 +735,15 @@ void QApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mouse cursor.data()->pointerEvent(ev); } + int oldOpenPopupCount = openPopupCount; QApplication::sendSpontaneousEvent(mouseWidget, &ev); + +#ifndef QT_NO_CONTEXTMENU + if (type == QEvent::MouseButtonPress && button == Qt::RightButton && (openPopupCount == oldOpenPopupCount)) { + QContextMenuEvent e(QContextMenuEvent::Mouse, localPoint, globalPoint, modifiers); + QApplication::sendSpontaneousEvent(mouseWidget, &e); + } +#endif // QT_NO_CONTEXTMENU } |