Backout changeset 0c18edd01cd4 (bug 795307) for broken builds on Windows

This commit is contained in:
Ehsan Akhgari 2012-09-28 15:40:00 -04:00
parent fea453f734
commit 3648c996b6

View File

@ -38,18 +38,8 @@ static int32_t GetSystemParam(long flag, int32_t def)
return ::SystemParametersInfo(flag, 0, &value, 0) ? value : def;
}
static int32_t IsTouchPresent()
{
int32_t touchCapabilities;
touchCapabilities = ::GetSystemMetrics(SM_DIGITIZER);
return ((touchCapabilities & NID_READY) &&
(touchCapabilities & (NID_EXTERNAL_TOUCH | NID_INTEGRATED_TOUCH)));
}
nsLookAndFeel::nsLookAndFeel() : nsXPLookAndFeel()
{
mozilla::Telemetry::Accumulate(mozilla::Telemetry::TOUCH_ENABLED_DEVICE,
IsTouchPresent());
}
nsLookAndFeel::~nsLookAndFeel()
@ -375,7 +365,13 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
aResult = !IsAppThemed();
break;
case eIntID_TouchEnabled:
aResult = IsTouchPresent();
aResult = 0;
int32_t touchCapabilities;
touchCapabilities = ::GetSystemMetrics(SM_DIGITIZER);
if ((touchCapabilities & NID_READY) &&
(touchCapabilities & (NID_EXTERNAL_TOUCH | NID_INTEGRATED_TOUCH))) {
aResult = 1;
}
break;
case eIntID_WindowsDefaultTheme:
aResult = nsUXThemeData::IsDefaultWindowTheme();