| Index: win8/delegate_execute/chrome_util.cc
|
| ===================================================================
|
| --- win8/delegate_execute/chrome_util.cc (revision 156164)
|
| +++ win8/delegate_execute/chrome_util.cc (working copy)
|
| @@ -264,4 +264,15 @@
|
| return app_id.append(suffix);
|
| }
|
|
|
| +bool IsMachineATablet() {
|
| + // A tablet by this definition is something that has integrated multi-touch
|
| + // but is not also pen-enabled. For example a Thinkpad X220 tablet is not
|
| + // considered a tabled while a Samsum 700T tablet is.
|
| + const int kPenInput = NID_INTEGRATED_PEN | NID_EXTERNAL_PEN;
|
| + const int kMultiTouch = NID_INTEGRATED_TOUCH | NID_MULTI_INPUT | NID_READY;
|
| + int sm = GetSystemMetrics(SM_DIGITIZER);
|
| + AtlTrace("GetSystemMetrics for SM_DIGITIZER is 0x%x\n", sm);
|
| + return ((sm & kMultiTouch) == kMultiTouch) && ((sm & kPenInput) == 0);
|
| +}
|
| +
|
| } // delegate_execute
|
|
|