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

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

Issue 2673963002: Drop hover:on-demand support & let touch-screens report "none" instead. (Closed)
Patch Set: Fixed a "yikes!" Created 3 years, 9 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 | « ui/base/touch/touch_device_linux.cc ('k') | 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 ef4c316315022c21f2a1727b1b50d50fb36df70e..bd7f1eafc134e854ef92988c329946b55db85324 100644
--- a/ui/base/touch/touch_device_win.cc
+++ b/ui/base/touch/touch_device_win.cc
@@ -52,14 +52,15 @@ int GetAvailablePointerTypes() {
// This method follows the same logic as above but with hover types.
int GetAvailableHoverTypes() {
if (base::win::IsTabletDevice(nullptr))
- return HOVER_TYPE_ON_DEMAND;
-
- if (GetSystemMetrics(SM_MOUSEPRESENT) == 0)
return HOVER_TYPE_NONE;
- int available_hover_types = HOVER_TYPE_HOVER;
- if (IsTouchDevicePresent())
- available_hover_types |= HOVER_TYPE_ON_DEMAND;
+ int available_hover_types;
+ if (GetSystemMetrics(SM_MOUSEPRESENT) != 0) {
+ available_hover_types = HOVER_TYPE_HOVER;
+ if (IsTouchDevicePresent())
+ available_hover_types |= HOVER_TYPE_NONE;
+ } else
+ available_hover_types = HOVER_TYPE_NONE;
return available_hover_types;
}
@@ -92,8 +93,6 @@ PointerType GetPrimaryPointerType(int available_pointer_types) {
HoverType GetPrimaryHoverType(int available_hover_types) {
if (available_hover_types & HOVER_TYPE_HOVER)
return HOVER_TYPE_HOVER;
- if (available_hover_types & HOVER_TYPE_ON_DEMAND)
- return HOVER_TYPE_ON_DEMAND;
DCHECK_EQ(available_hover_types, HOVER_TYPE_NONE);
return HOVER_TYPE_NONE;
}
« no previous file with comments | « ui/base/touch/touch_device_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698