summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Laanmets <lauri.laanmets@eesti.ee>2013-05-08 00:11:53 +0300
committerLauri Laanmets <lauri.laanmets@eesti.ee>2013-09-04 11:16:45 +0200
commit80592b0e7145fb876ea0e84a6e3dadfd5f7481b6 (patch)
treea1ada08fd370acd6eaf9daa2d458ccee0594c32c
parent4ac977553f2b04a54feb74ebcbc90ef255d38895 (diff)
Focus gained by mouse click handled correctly now.
Task-number: QTSOLBUG-70 Change-Id: Id9cef80728762252542908b4fc62cb1509666da2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
-rw-r--r--qtwinmigrate/src/qwinwidget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qtwinmigrate/src/qwinwidget.cpp b/qtwinmigrate/src/qwinwidget.cpp
index 167369c..4a04751 100644
--- a/qtwinmigrate/src/qwinwidget.cpp
+++ b/qtwinmigrate/src/qwinwidget.cpp
@@ -261,7 +261,9 @@ bool QWinWidget::winEvent(MSG *msg, long *)
#endif
if (msg->message == WM_SETFOCUS) {
Qt::FocusReason reason;
- if (::GetKeyState(VK_SHIFT) < 0)
+ if (::GetKeyState(VK_LBUTTON) < 0 || ::GetKeyState(VK_RBUTTON) < 0)
+ reason = Qt::MouseFocusReason;
+ else if (::GetKeyState(VK_SHIFT) < 0)
reason = Qt::BacktabFocusReason;
else
reason = Qt::TabFocusReason;