summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-08-05 16:02:48 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-08-06 09:56:47 (GMT)
commit32f1e151cb66da08b8c7578b0701408fcb009ea2 (patch)
treeefedc96f6a62757407f2eff40074779f304b819b /src
parent241e5cbe235953c60a6d8db2a8b6aacd909c2d28 (diff)
downloadQt-32f1e151cb66da08b8c7578b0701408fcb009ea2.zip
Qt-32f1e151cb66da08b8c7578b0701408fcb009ea2.tar.gz
Qt-32f1e151cb66da08b8c7578b0701408fcb009ea2.tar.bz2
Small fix for native gestures on windows.
We should close the gestureinfo handle only we managed to open successfully. Reviewed-by: trustme
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_win.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 3177cc1..6421ed9 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -3716,13 +3716,8 @@ bool QETWidget::translateCloseEvent(const MSG &)
bool QETWidget::translateGestureEvent(const MSG &msg)
{
GESTUREINFO gi;
+ memset(&gi, 0, sizeof(GESTUREINFO));
gi.cbSize = sizeof(GESTUREINFO);
- gi.dwFlags = 0;
- gi.ptsLocation.x = 0;
- gi.ptsLocation.y = 0;
- gi.dwID = 0;
- gi.dwInstanceID = 0;
- gi.dwSequenceID = 0;
QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
BOOL bResult = qAppPriv->GetGestureInfo((HANDLE)msg.lParam, &gi);
@@ -3756,6 +3751,7 @@ bool QETWidget::translateGestureEvent(const MSG &msg)
default:
break;
}
+ qAppPriv->CloseGestureInfoHandle((HANDLE)msg.lParam);
if (event.gestureType != QNativeGestureEvent::None)
qt_sendSpontaneousEvent(widget, &event);
} else {
@@ -3763,7 +3759,6 @@ bool QETWidget::translateGestureEvent(const MSG &msg)
if (dwErr > 0)
qWarning() << "translateGestureEvent: error = " << dwErr;
}
- qAppPriv->CloseGestureInfoHandle((HANDLE)msg.lParam);
return true;
}