Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global commands: restore commands affected by division operator differences between Python 2 and 3 #9748

Conversation

josephsl
Copy link
Collaborator

Link to issue number:

Another variant of #9641

Summary of the issue:

Global commands involving divisoin operators are broken in Python 3: move mouse to navigator object and battery status.

Description of how this pull request fixes the issue:

Changed one slash to two slashes for affected commands.

Testing performed:

Compiled a Python 3 version of NVDA and ran affected commands before and after division operator change.

Known issues with pull request:

None

Change log entry:

None

Additional context:

There are division operator issues in other files that cannot be patched until UI Access privilege is restored, the most prominent one being touch tracking (may or may not be an integer when calculating touch gesture tracking).

…ee integers for mouse coordinates. Re nvaccess#9641.

Move mouse to navigator object command fails in Python 3 because of ytpe differences: user32::SetCursorPos wants integers, but because one slash is used, it'll get floats, causing errors to be logged. Thus guarantee inteers via floor division, thus restoring the said command.
…nvaccess#9641.

With just one slash, hours nad minutes for remaining time on battery will get floats when the text format specifies integers. Thus use floor division, restoring battery status command in Python 3.
@michaelDCurran michaelDCurran merged commit e8fdfbf into nvaccess:threshold_py3_staging Jun 15, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Jun 15, 2019
@josephsl josephsl deleted the py3divisionOperatorGlobalCommands branch July 19, 2020 22:13
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.

None yet

3 participants