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

Fix up of: Hide the mouse when screen curtain is on (PR #10182) #10211

Conversation

JulienCochuyt
Copy link
Collaborator

Only hide the mouse when screen curtain effectively turned on.
This prevents the mouse to disappear if the screen curtain could no be turned
on because the Windows Magnifier is started.

Link to issue number:

Fix up of PR #9982

Summary of the issue:

If the Windows Magnifier is on, Screen Curtain fails to turn on but the mouse is hidden.
To show the mouse again, one has to turn Windows Magnifier off then turn Screen Curtain on and off then turn Windows Magnifier back on.

Description of how this pull request fixes the issue:

Hide the mouse only when Screen Curtain effectively turned on.

Testing performed:

Checked the mouse is not hidden if Screen Curtain failed to turn on.
Checked the mouse is hidden if Screen Curtain succeeded to turn on.
Checked the mouse is shown again when Screen Curtain is turned off.

Known issues with pull request:

Change log entry:

N/A

Only hide the mouse when screen curtain effectively turned on.
This prevents the mouse to disappear if the screen curtain could no be turned
on because the Windows Magnifier is started.
Copy link
Collaborator

@LeonarddeR LeonarddeR left a comment

Choose a reason for hiding this comment

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

Good catch, thanks @JulienCochuyt

source/visionEnhancementProviders/screenCurtain.py Outdated Show resolved Hide resolved
try:
super(VisionEnhancementProvider, self).terminate()
Magnification.MagUninitialize()
except: # noqa: E722
Copy link
Collaborator

Choose a reason for hiding this comment

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

These two lines don't have to be there. not specifying an except in a try/finally will just raise.

Having said that, the only exception I expect is Windows Error.

@michaelDCurran michaelDCurran merged commit 1587299 into nvaccess:master Sep 17, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Sep 17, 2019
@JulienCochuyt JulienCochuyt deleted the pr10182-screenCurtainVsWindowsMagnifier branch September 17, 2019 08:39
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.

4 participants