summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_win.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-02 10:13:39 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-11-03 10:26:05 (GMT)
commit4843b437b90800d238f14e7a4558045ddc37cd4b (patch)
treeb3e8cb1a9b510200b8308e259af3327f5e807889 /src/gui/kernel/qapplication_win.cpp
parent54db3afc9797a3adf5a38f35f6338960924e9e1a (diff)
downloadQt-4843b437b90800d238f14e7a4558045ddc37cd4b.zip
Qt-4843b437b90800d238f14e7a4558045ddc37cd4b.tar.gz
Qt-4843b437b90800d238f14e7a4558045ddc37cd4b.tar.bz2
Made native Pan gesture work on Windows.
Reviewed-by: trustme
Diffstat (limited to 'src/gui/kernel/qapplication_win.cpp')
-rw-r--r--src/gui/kernel/qapplication_win.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index d98ecbb..387c29b 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -2499,24 +2499,24 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
if (qAppPriv->GetGestureInfo)
bResult = qAppPriv->GetGestureInfo((HANDLE)msg.lParam, &gi);
if (bResult) {
-// if (gi.dwID == GID_BEGIN) {
-// // find the alien widget for the gesture position.
-// // This might not be accurate as the position is the center
-// // point of two fingers for multi-finger gestures.
-// QPoint pt(gi.ptsLocation.x, gi.ptsLocation.y);
-// QWidget *w = widget->childAt(widget->mapFromGlobal(pt));
-// qAppPriv->gestureWidget = w ? w : widget;
-// }
-// if (qAppPriv->gestureWidget)
-// static_cast<QETWidget*>(qAppPriv->gestureWidget)->translateGestureEvent(msg, gi);
-// if (qAppPriv->CloseGestureInfoHandle)
-// qAppPriv->CloseGestureInfoHandle((HANDLE)msg.lParam);
-// if (gi.dwID == GID_END)
-// qAppPriv->gestureWidget = 0;
-// } else {
-// DWORD dwErr = GetLastError();
-// if (dwErr > 0)
-// qWarning() << "translateGestureEvent: error = " << dwErr;
+ if (gi.dwID == GID_BEGIN) {
+ // find the alien widget for the gesture position.
+ // This might not be accurate as the position is the center
+ // point of two fingers for multi-finger gestures.
+ QPoint pt(gi.ptsLocation.x, gi.ptsLocation.y);
+ QWidget *w = widget->childAt(widget->mapFromGlobal(pt));
+ qAppPriv->gestureWidget = w ? w : widget;
+ }
+ if (qAppPriv->gestureWidget)
+ static_cast<QETWidget*>(qAppPriv->gestureWidget)->translateGestureEvent(msg, gi);
+ if (qAppPriv->CloseGestureInfoHandle)
+ qAppPriv->CloseGestureInfoHandle((HANDLE)msg.lParam);
+ if (gi.dwID == GID_END)
+ qAppPriv->gestureWidget = 0;
+ } else {
+ DWORD dwErr = GetLastError();
+ if (dwErr > 0)
+ qWarning() << "translateGestureEvent: error = " << dwErr;
}
result = true;
break;