touchscreen and magnifier support#20357
Conversation
|
@Boumtchack this approach will not work. Disabling NVDA's touch support does *NOT disable touchscreen input, it simply disables NVDA's processing of touch events. Arguably this makes the situation worse, as touching the screen in this state will silently perform actions. While we have no way of preventing this in portable copies (we can't intercept touch inputs in portables), we already intercept all touch events when touch support is enabled in installed copies. What we need to do is continue to block touch inputs but alert the user that touch support is unavailable. Of course, if NVDA's touch support is disabled, or NVDA is running from source, portable, or (I think) without UI access, we still need to pop up a dialog alerting the user that the touch screen will not behave as expected while the magnifier is running. |
Link to issue number:
Closes #20038
Summary of the issue:
Touch screen input causes incorrect mappings when the NVDA magnifier is running. Touch input must be disabled while the magnifier is active to prevent this conflict.
Description of user facing changes:
Touch interaction is automatically disabled when the magnifier starts and restored when it stops. On portable copies where touch cannot be disabled, trying to re-enable touch interaction while the magnifier is running displays a message asking the user to disable the magnifier first.
Description of developer facing changes:
Magnifier._startMagnifier calls touchHandler.setTouchSupport(False) when touch is supported and active, restoring it in _stopMagnifier. A new onTouchSupportEnabling() method on Magnifier is called by touchHandler.setTouchSupport before enabling, blocking activation and returning False if the magnifier is active.
Description of development approach:
The touchscreen disable/enable follows the same lifecycle pattern as the existing screen curtain integration. The blocking callback mirrors the onScreenCurtainEnabled approach: touchHandler lazily imports _magnifier and delegates the guard logic to the magnifier instance, keeping touch-handling code decoupled from magnifier internals.
Testing strategy:
unit
Known issues with pull request:
Code Review Checklist: