Bug 1066237 - Add explicit returning zero number of touch points when there is no touch device available. r=smaug

This commit is contained in:
Nick Lebedev 2014-10-10 08:36:00 -04:00
parent d4ac7b6bef
commit b6cbf22f95

View File

@ -190,6 +190,12 @@ using namespace mozilla::gfx;
using namespace mozilla::layers; using namespace mozilla::layers;
using namespace mozilla::widget; using namespace mozilla::widget;
namespace mozilla {
namespace widget {
extern int32_t IsTouchDeviceSupportPresent();
}
}
/************************************************************** /**************************************************************
************************************************************** **************************************************************
** **
@ -3611,7 +3617,7 @@ nsWindow::UpdateThemeGeometries(const nsTArray<ThemeGeometry>& aThemeGeometries)
uint32_t uint32_t
nsWindow::GetMaxTouchPoints() const nsWindow::GetMaxTouchPoints() const
{ {
if (IsWin7OrLater()) { if (IsWin7OrLater() && IsTouchDeviceSupportPresent()) {
return GetSystemMetrics(SM_MAXIMUMTOUCHES); return GetSystemMetrics(SM_MAXIMUMTOUCHES);
} }
return 0; return 0;