Viewport on Windows 11 can't be scrolled via touch


it seems that scrolling a Viewport with a touch gesture on a tablet is not working on Windows 11.

Before Windows 11 a tablet like the Surface would switch to Tablet Mode when the hardware keyboard was detached, and the main mouse source would become of type MouseInputSource::InputSourceType::touch. This enabled the Viewport to be scrolled by dragging.

Viewport::Viewport (const String& name)  : Component (name)
    setScrollOnDragEnabled (Desktop::getInstance().getMainMouseSource().isTouch());

Now on Windows 11 Tablet Mode is gone, meaning that at any time – with or without keyboard attached – users can interact with mouse or touch.

So to fix this the Viewport should probably change and react to the single gestures instead of being configured via the flag?

Thanks for reporting. I’ve updated the Viewport and Listbox implementations to more gracefully handle simultaneous mouse/touch input:

Please try this out and let us know if you encounter any further issues with this change.