Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: ui/base/touch/touch_device_win.cc

Issue 11778042: Corrected logic in IsTouchDevicePresent to ignore pen devices. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/touch/touch_device_win.cc
diff --git a/ui/base/touch/touch_device_win.cc b/ui/base/touch/touch_device_win.cc
index 0a0025143abf132f06468aeda2d104c849b1e4cf..f1f4f6ea78067e4319ea997ff7d22912ffdb8830 100644
--- a/ui/base/touch/touch_device_win.cc
+++ b/ui/base/touch/touch_device_win.cc
@@ -9,9 +9,9 @@
namespace ui {
bool IsTouchDevicePresent() {
- // Docs: http://msdn.microsoft.com/en-us/library/dd371581(VS.85).aspx
- return (::base::win::GetVersion() >= ::base::win::VERSION_WIN7) &&
- (::GetSystemMetrics(SM_DIGITIZER) > 0);
+ int value = GetSystemMetrics(SM_DIGITIZER);
+ return (value & (NID_READY | NID_INTEGRATED_TOUCH)) ==
+ (NID_READY | NID_INTEGRATED_TOUCH);
}
} // namespace ui
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698