Skip to content

Fix some mouse gestures#18906

Merged
SaschaCowley merged 2 commits into
masterfrom
fixClickGestures
Sep 15, 2025
Merged

Fix some mouse gestures#18906
SaschaCowley merged 2 commits into
masterfrom
fixClickGestures

Conversation

@SaschaCowley

@SaschaCowley SaschaCowley commented Sep 12, 2025

Copy link
Copy Markdown
Member

Link to issue number:

Follow-up to #18883
Fixes #18913

Summary of the issue:

Some gestures that control the mouse are broken. These include left/right mouse button lock/unlock, and navigator object default action.

Description of user facing changes:

They work again.

Description of developer facing changes:

None.

Description of development approach:

Updated mouseHandler.executeMouseEvent to send 0 instead of None as the value of dwExtraInfo. This is necessary as dwExtraInfo is correctly declared as ULONG_PTR since #18883, so ctypes will not accept None.

Testing strategy:

Ran from source and tested clicking and locking/unlocking the left and right mouse buttons, as well as activating the navigator object.

Known issues with pull request:

None

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@SaschaCowley SaschaCowley requested a review from a team as a code owner September 12, 2025 05:08
@SaschaCowley SaschaCowley added this to the 2026.1 milestone Sep 12, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes broken mouse gestures by correcting the dwExtraInfo parameter in executeMouseEvent to use 0 instead of None. This change addresses compatibility issues introduced in #18883 where the parameter was correctly declared as ULONG_PTR, which cannot accept None values.

  • Fixed the dwExtraInfo parameter type issue in winUser.mouse_event call
  • Updated function signatures to use modern Python type hints
  • Improved documentation formatting and clarity
Comments suppressed due to low confidence (3)

source/mouseHandler.py:1

  • The Optional import is removed but the file still uses Optional[float] type hints on lines 336, 344, and 357. This will cause import errors. Either keep the import or update all type hints to use the modern float | None syntax consistently.
# A part of NonVisual Desktop Access (NVDA)

source/mouseHandler.py:350

  • Incorrect docstring parameter syntax. Should be @param (without space) instead of @ param to follow proper docstring formatting.
	@ param releaseDelay: optional float in seconds of how long NVDA should sleep

source/mouseHandler.py:363

  • Incorrect docstring parameter syntax. Should be @param (without space) instead of @ param to follow proper docstring formatting.
	@ param releaseDelay: optional float in seconds of how long NVDA should sleep

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@SaschaCowley SaschaCowley merged commit 134f97e into master Sep 15, 2025
40 checks passed
@SaschaCowley SaschaCowley deleted the fixClickGestures branch September 15, 2025 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attempting to right click an item raises an error

3 participants