W3C home > Mailing lists > Public > public-pointer-events@w3.org > July to September 2014

Re: IE implementation of navigator.maxTouchPoints

From: Rick Byers <rbyers@chromium.org>
Date: Wed, 17 Sep 2014 18:54:07 -0400
Message-ID: <CAFUtAY8TJvojxWD6JQL2Yy-EUs2oc85BcVC1CFWEsGQkxEnW4Q@mail.gmail.com>
To: Jacob Rossi <Jacob.Rossi@microsoft.com>
Cc: Sangwhan Moon <sangwhan@iki.fi>, Sangwhan Moon <smoon@opera.com>, "public-pointer-events@w3.org" <public-pointer-events@w3.org>, David Bokan <bokan@chromium.org>
Thanks Jacob.  What we ended up landing
<https://codereview.chromium.org/563853002> is slightly more involved than
that - re-uses our existing touchscreen detection logic:

bool IsTouchDevicePresent() {  int value =
GetSystemMetrics(SM_DIGITIZER);  return (value & NID_READY) &&


int MaxTouchPoints() {  if (!IsTouchDevicePresent())    return 0;
return GetSystemMetrics(SM_MAXIMUMTOUCHES);}

Does your Windows input team see any problem with relying on this?  We have
been using this IsTouchDevicePresent code for awhile (took some feedback
from users to get it here), so using it also in MaxTouchPoints seems very
reasonable and low risk to us...


On Fri, Sep 12, 2014 at 5:38 PM, Jacob Rossi <Jacob.Rossi@microsoft.com>

> Upon further discussion with the Windows input team, it looks like it's
> actually a Win7 bug that SM_DIGITIZER is false in these cases and that it's
> definitely not the case that this represents the difference between a
> touchscreen and a touchpad.  They advised against this using this pattern.
> Unfortunately, there is not a way to differentiate rogue touchpad drivers
> from touchscreen.  In Windows 8+, we're encouraging touchpad manufacturers
> to use Precision Touchpad, which enables the same scenarios without virtual
> touch drivers.
> http://msdn.microsoft.com/en-us/library/windows/hardware/dn467317(v=vs.85).aspx
> -Jacob
> -----Original Message-----
> From: Jacob Rossi [mailto:Jacob.Rossi@microsoft.com]
> Sent: Friday, September 12, 2014 10:49 AM
> To: Sangwhan Moon; Rick Byers
> Cc: Sangwhan Moon; public-pointer-events@w3.org; David Bokan
> Subject: RE: IE implementation of navigator.maxTouchPoints
> On Wed, Sep 10, 2014 at 6:46 PM, Rick Byers <rbyers@chromium.org> wrote:
> >
> > Thank you!  Indeed it looks like this is Windows 7 only, and unlike IE
> we do still want to support touchscreens on Windows 7 (a small but
> non-trivial fraction of our touchscreen users are still on Windows 7).  It
> looks like SM_DIGITIZER is false in these cases, so I think we can try
> looking at SM_MAXIMUMTOUCHES only when SM_DIGITIZER is true. Sound
> reasonable to you?
> I'm not an expert with these APIs. I have a mail thread with the Windows
> team that builds these APIs asking for advice and any implications of the
> design you suggested. I'll let you know what I find out.
> -Jacob
Received on Wednesday, 17 September 2014 22:54:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:48:11 UTC