summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_win.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-08-19 11:49:32 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-08-21 12:52:12 (GMT)
commit09878f0d63000a2920458884d5ae0d765939395e (patch)
tree323842d2191425d8bad31b773a465ecd1c372b3d /src/gui/kernel/qwidget_win.cpp
parente866577453334f528fdf289ab825af1911586e47 (diff)
downloadQt-09878f0d63000a2920458884d5ae0d765939395e.zip
Qt-09878f0d63000a2920458884d5ae0d765939395e.tar.gz
Qt-09878f0d63000a2920458884d5ae0d765939395e.tar.bz2
Dont create native windows when setting up gestures.
The code used to create native window handle even before checking if the widget subscribes to gestures, basically breaking alien widgets. Check the position of the gesture instead when the WM_GESTURE message is received in the GID_BEGIN state. This will work properly in most cases - but not always as the position that we get with the WM_GESTURE message is the center point of the multitouch gesture, which might be outside of the widget depending on positions of fingers. Reviewed-by: trustme
Diffstat (limited to 'src/gui/kernel/qwidget_win.cpp')
-rw-r--r--src/gui/kernel/qwidget_win.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index ea334b6..bf2abc8 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -2066,7 +2066,11 @@ void QWidgetPrivate::winSetupGestures()
bool needh = false;
bool needv = false;
bool singleFingerPanEnabled = false;
- QStandardGestures gestures = qAppPriv->widgetGestures[q];
+ QApplicationPrivate::WidgetStandardGesturesMap::const_iterator it =
+ qAppPriv->widgetGestures.find(q);
+ if (it == qAppPriv->widgetGestures.end())
+ return;
+ const QStandardGestures &gestures = it.value();
WId winid = 0;
if (QAbstractScrollArea *asa = qobject_cast<QAbstractScrollArea*>(q)) {