[Note]: - When activating/deactivating the touchscreen while the test page (https://hiikezoe.github.io/interaction-media-features.html) is opened, the changes are not seen automatically; A page refresh has to be done. [Affected versions]: - v64.0a1 [Affected platforms]: - Windows [Steps to reproduce]: Precondition 1: Enable the touch-screen of the touch-screen capable device (like Microsoft Surface), tutorial here: https://support.microsoft.com/en-us/help/4028019/windows-enable-and-disable-your-touchscreen-in-windows-10 Precondition 2: Connect a mouse to the device. 1. Lunch the browser and open page: https://hiikezoe.github.io/interaction-media-features.html 2. Disable the touchscreen of the device from the Device Manager. [Expected result]: - The content of the page changes to match the recognized pointing devices automatically. [Actual result]: - The content of the page DOES NOT change automatically! (However, it does change after a page refresh.) [Additional notes]: - This issue does not occur in the case of the Microsoft Surface tablet. - The touchscreen "device" is differently recognized in the device manager, compared to the Microsoft Surface tablet. - The mouse's connection and disconnection is recognized automatically.
Bodea, thanks for the detailed report! Given the fact the touchscreen on the OptiPlex 9020 is not recognized as a mouse type device, we might also need to watch other device types in InputDeviceUtils::RegisterNotification . Maybe GUID_DEVINTERFACE_HID?  https://hg.mozilla.org/mozilla-central/file/ddcd7cc2f3cd/widget/windows/InputDeviceUtils.cpp#l26
Priority: -- → P3
Hey Bodea, could you please this binary on the OptiPlex 9020 AIO? https://treeherder.mozilla.org/#/jobs?repo=try&revision=84214e868aa78b3e6dfcb5149800ad877938e064
Hey Hiro, I have tried this binary on the problematic DELL device and it seems that the issue is fixed. The test page automatically detects the activation/deactivation of the touchscreen when using that build. I have also performed a quick regression test on the Surface to be sure it didn't cause any new issues and it's OK.
Great! Thank you, Bodea!
Assignee: nobody → hikezoe
Status: NEW → ASSIGNED
It seems some touchscreen devices are recognized as an HID not a mouse, so for such devices we need to use GUID_DEVINTERFACE_HID instead. I've confirmed that WM_DEVICECHANGE is received when a mouse is connected/disconnected on a Thinkpad even if we use GUID_DEVINTERFACE_HID here.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/ddb585f4d9d7 Watch GUID_DEVINTERFACE_HID device changes instead of GUID_DEVINTERFACE_MOUSE. r=masayuki
This fix was verified on DELL OptiPlex 9020 AIO device. The activation and deactivation of the touchscreen are now detected automatically by the test page, no refresh needed. Bug verified. Thank you!
You need to log in before you can comment on or make changes to this bug.