diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-02-16 12:24:32 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-17 05:26:08 +0100 |
commit | 4212898822f1798dac0167e4f6a147bd8a3b3dcc (patch) | |
tree | 34552fa359ba06fa125c7d106be4194fef9f6b9e /src/plugins/platforms/windows/qwindowscontext.cpp | |
parent | 543d994967628f580eb34d4d0241846eaef3bd7d (diff) |
Base active window handling on WM_SET/KILLFOCUS.
Make it work for child windows, fixing the isActive()
test of QWindow.
Task-number: QTBUG-24185
Change-Id: I75597c2d322969f7e109d76e30b9b1f4b66c6e1e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 5f7dfb1b10..a257736d98 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -676,10 +676,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, } // Events without an associated QWindow or events we are not interested in. switch (et) { - case QtWindows::DeactivateApplicationEvent: - case QtWindows::DeactivateWindowEvent: - QWindowSystemInterface::handleWindowActivated(0); - return true; case QtWindows::InputMethodStartCompositionEvent: return QWindowsInputContext::instance()->startComposition(hwnd); case QtWindows::InputMethodCompositionEvent: @@ -773,9 +769,12 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, return d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result); case QtWindows::TouchEvent: return d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, result); - case QtWindows::ActivateWindowEvent: + case QtWindows::FocusInEvent: // see QWindowsWindow::requestActivateWindow(). QWindowSystemInterface::handleWindowActivated(platformWindow->window()); return true; + case QtWindows::FocusOutEvent: + QWindowSystemInterface::handleWindowActivated(0); + return true; case QtWindows::ShowEvent: platformWindow->handleShown(); return true; |