summaryrefslogtreecommitdiff
path: root/src/controls/qquickmenupopupwindow_p.h
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-09-05 17:28:06 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-12 19:16:36 +0200
commit82081e737038262c82c2e408d412fc80a607bf9f (patch)
treee7d6a064648b64b95f4b4a7c05c407b1e776c65a /src/controls/qquickmenupopupwindow_p.h
parent6bcacdecb8445a5ad9a31f6bdac99cde076e6295 (diff)
downloadqtquickcontrols-82081e737038262c82c2e408d412fc80a607bf9f.tar.gz
Menu: Fix keyboard navigation on Windows
The Windows QPA plugin doesn't trigger activated window events for popups, resulting on the popup window not being the application focus window, and therefore, the popup window's content item not getting focus. This results in key pressed events not being sent to the menu item. We workaround this by emitting the window activated event ourselves right after the popup window is exposed. Task-number: QTBUG-33175 Change-Id: I77d1eb33b71af2232a6be6d0f7c6b480bffc10d4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/qquickmenupopupwindow_p.h')
-rw-r--r--src/controls/qquickmenupopupwindow_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/controls/qquickmenupopupwindow_p.h b/src/controls/qquickmenupopupwindow_p.h
index aead2bd8..b515ec3d 100644
--- a/src/controls/qquickmenupopupwindow_p.h
+++ b/src/controls/qquickmenupopupwindow_p.h
@@ -81,11 +81,14 @@ protected:
void mousePressEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
+ void exposeEvent(QExposeEvent *);
+ void hideEvent(QHideEvent *);
private:
void forwardEventToTransientParent(QMouseEvent *);
bool m_mouseMoved;
+ bool m_needsActivatedEvent;
QQuickItem *m_itemAt;
QPointF m_oldItemPos;
QQuickItem *m_parentItem;