diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2012-10-22 14:43:38 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-25 10:08:04 +0200 |
commit | 9fc7fcb4c90f9fdc5bb3581609a1d5b01cfb7076 (patch) | |
tree | 205dd5103662563949f9bea6ca7c85aea905a33c /src/gui/kernel/qwindowsysteminterface.cpp | |
parent | 8e002f1c0e0e0605d6cdfb90cdf909035eb643c8 (diff) |
Add ContextMenu event to QWindowSystemInterface
Context menu key wasn't working, as QPA had no handling for it.
Added ContextMenu event to QWindowSystemInterface and proper handling
to QGuiApplication and QWidgetWindow.
Also provide Windows implementation.
Task-number: QTBUG-27648
Change-Id: I7ce71ec4b5cdcc7be758e67f9faf6d863f7b19be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 82e0e44ac7..6fb10b6c75 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -630,6 +630,18 @@ void QWindowSystemInterface::handlePlatformPanelEvent(QWindow *w) QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); } +#ifndef QT_NO_CONTEXTMENU +void QWindowSystemInterface::handleContextMenuEvent(QWindow *w, bool mouseTriggered, + const QPoint &pos, const QPoint &globalPos, + Qt::KeyboardModifiers modifiers) +{ + QWindowSystemInterfacePrivate::ContextMenuEvent *e = + new QWindowSystemInterfacePrivate::ContextMenuEvent(w, mouseTriggered, pos, + globalPos, modifiers); + QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); +} +#endif + Q_GUI_EXPORT void qt_handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods = Qt::NoModifier) { QWindowSystemInterface::handleMouseEvent(w, local, global, b, mods); } |