mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 795307 - Use telemetry to report touch enabled device stats. r=nfroyd
This commit is contained in:
parent
8e0584101d
commit
1bf7273ba1
@ -38,8 +38,18 @@ 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()
|
||||
@ -365,13 +375,7 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
|
||||
aResult = !IsAppThemed();
|
||||
break;
|
||||
case eIntID_TouchEnabled:
|
||||
aResult = 0;
|
||||
int32_t touchCapabilities;
|
||||
touchCapabilities = ::GetSystemMetrics(SM_DIGITIZER);
|
||||
if ((touchCapabilities & NID_READY) &&
|
||||
(touchCapabilities & (NID_EXTERNAL_TOUCH | NID_INTEGRATED_TOUCH))) {
|
||||
aResult = 1;
|
||||
}
|
||||
aResult = IsTouchPresent();
|
||||
break;
|
||||
case eIntID_WindowsDefaultTheme:
|
||||
aResult = nsUXThemeData::IsDefaultWindowTheme();
|
||||
|
Loading…
Reference in New Issue
Block a user