diff options
| author | Samuel Rødal <[email protected]> | 2011-09-29 18:02:54 +0200 |
|---|---|---|
| committer | Qt by Nokia <[email protected]> | 2011-10-05 12:49:29 +0200 |
| commit | 11070a090a9cc77d02315a3cb39eaf628bd9bfe7 (patch) | |
| tree | f9ea6781a9694e991136ffb78fb1f1382cbe2c92 /src/widgets/kernel/qwidgetwindow_qpa.cpp | |
| parent | 253497b7446c7d723aa3bdd7152e25d6852f2604 (diff) | |
Added QWindow::isActive() and focus in / out events.
Renamed QGuiApplication::activeWindow() to
QGuiApplication::focusWindow(), implemented QWindow::isActive() as a
style hint, and added focus in / out events.
Change-Id: I71866e76c5a817def3e17bcc20a4fc32081a0e7a
Reviewed-on: http://codereview.qt-project.org/5811
Reviewed-by: Qt Sanity Bot <[email protected]>
Reviewed-by: Gunnar Sletta <[email protected]>
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow_qpa.cpp')
| -rw-r--r-- | src/widgets/kernel/qwidgetwindow_qpa.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidgetwindow_qpa.cpp b/src/widgets/kernel/qwidgetwindow_qpa.cpp index ee5cd7482ec..2265fb55fb3 100644 --- a/src/widgets/kernel/qwidgetwindow_qpa.cpp +++ b/src/widgets/kernel/qwidgetwindow_qpa.cpp @@ -79,6 +79,12 @@ bool QWidgetWindow::event(QEvent *event) handleEnterLeaveEvent(event); return true; + // these should not be sent to QWidget, the corresponding events + // are sent by QApplicationPrivate::notifyActiveWindowChange() + case QEvent::FocusIn: + case QEvent::FocusOut: + return false; + case QEvent::KeyPress: case QEvent::KeyRelease: handleKeyEvent(static_cast<QKeyEvent *>(event)); |
