diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-23 06:16:01 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-23 06:16:01 (GMT) |
commit | 66da5958bc3ec0df60e76bb32ead94bfe7b2eac7 (patch) | |
tree | 20ad65ee2f5396a0d16cf81462fd1d170795102c /src/gui/graphicsview | |
parent | 6c4a1d0664f74fc9fe0533ca245d75355695e5be (diff) | |
parent | b2ca05031381103e6916c63677e9eaff51c76055 (diff) | |
download | Qt-66da5958bc3ec0df60e76bb32ead94bfe7b2eac7.zip Qt-66da5958bc3ec0df60e76bb32ead94bfe7b2eac7.tar.gz Qt-66da5958bc3ec0df60e76bb32ead94bfe7b2eac7.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Try to use multisampled opengl graphicssystem on all platforms
Make sure recreateEglSurface creates a surface if there isn't one
QX11GL: Implement QX11GLWindowSurface::grabWidget
QX11GL: Cleanup the window surface & remove some synchronisation
QX11GL: Move the shared context ownership into a seperate class
QX11GL: Don't do glFinish in endPaint
Implement QGLPaintDevice::metric()
Remove dead code left after a merge conflict resolution
Fixed autotest failures in tst_QPainterPath.
Removed bezier intersection code in path clipper.
Diagram scene example (graphicsview/diagramscene) refresh problem.
When using Qt::BypassGraphicsProxyWidget with QMenu the application is not stuck anymore
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsproxywidget.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index ad7cf5d..1f89714 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -1024,9 +1024,18 @@ void QGraphicsProxyWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent *even // Map event position from us to the receiver pos = d->mapToReceiver(pos, receiver); + QPoint globalPos = receiver->mapToGlobal(pos.toPoint()); + //If the receiver by-pass the proxy its popups + //will be top level QWidgets therefore they need + //the screen position. mapToGlobal expect the widget to + //have proper coordinates in regards of the windowing system + //but it's not true because the widget is embedded. + if (bypassGraphicsProxyWidget(receiver)) + globalPos = event->screenPos(); + // Send mouse event. ### Doesn't propagate the event. QContextMenuEvent contextMenuEvent(QContextMenuEvent::Reason(event->reason()), - pos.toPoint(), receiver->mapToGlobal(pos.toPoint()), event->modifiers()); + pos.toPoint(), globalPos, event->modifiers()); QApplication::sendEvent(receiver, &contextMenuEvent); event->setAccepted(contextMenuEvent.isAccepted()); |