summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-06-30 10:45:42 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-07-01 12:32:59 (GMT)
commit2471a5f348084ded48fd738683dde0137528c30d (patch)
treebe58a87b613a50baa692ea936cadf4f180c1a9e9 /src
parent5135ff96a86ab706e5a1190741c8b4a521be85dc (diff)
downloadQt-2471a5f348084ded48fd738683dde0137528c30d.zip
Qt-2471a5f348084ded48fd738683dde0137528c30d.tar.gz
Qt-2471a5f348084ded48fd738683dde0137528c30d.tar.bz2
Improved a bit detection of a touch screen on Windows.
Use the bitfield description from MSDN instead of just checking if there is any kind of digitizer. Reviewed-by: Prasanth
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_win.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index ef719ca..9e8a128 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -4086,7 +4086,12 @@ void QApplicationPrivate::initializeMultitouch_sys()
{
if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) {
static const int QT_SM_DIGITIZER = 94;
- QApplicationPrivate::HasTouchSupport = GetSystemMetrics(QT_SM_DIGITIZER);
+ int value = GetSystemMetrics(QT_SM_DIGITIZER);
+ static const int QT_NID_INTEGRATED_TOUCH = 0x01;
+ static const int QT_NID_EXTERNAL_TOUCH = 0x02;
+ static const int QT_NID_MULTI_INPUT = 0x40;
+ QApplicationPrivate::HasTouchSupport =
+ value & (QT_NID_INTEGRATED_TOUCH | QT_NID_EXTERNAL_TOUCH | QT_NID_MULTI_INPUT);
}
QLibrary library(QLatin1String("user32"));