Skip to content

Commit

Permalink
Hide the mouse when screen curtain is on (PR #10182)
Browse files Browse the repository at this point in the history
Use the MagShowSystemCursor function to hide the mouse. 
Fixes #10181
  • Loading branch information
LeonarddeR authored and feerrenrut committed Sep 10, 2019
1 parent 56f5fcd commit 2343000
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/visionEnhancementProviders/screenCurtain.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class Magnification:
_MagSetFullscreenColorEffectArgTypes = ((1, "effect"),)
_MagGetFullscreenColorEffectFuncType = WINFUNCTYPE(BOOL, POINTER(MAGCOLOREFFECT))
_MagGetFullscreenColorEffectArgTypes = ((2, "effect"),)
_MagShowSystemCursorFuncType = WINFUNCTYPE(BOOL, BOOL)
_MagShowSystemCursorArgTypes = ((1, "showCursor"),)

MagInitialize = _MagInitializeFuncType(("MagInitialize", _magnification))
MagInitialize.errcheck = _errCheck
Expand All @@ -57,6 +59,11 @@ class Magnification:
except AttributeError:
MagSetFullscreenColorEffect = None
MagGetFullscreenColorEffect = None
MagShowSystemCursor = _MagShowSystemCursorFuncType(
("MagShowSystemCursor", _magnification),
_MagShowSystemCursorArgTypes
)
MagShowSystemCursor.errcheck = _errCheck


class VisionEnhancementProvider(vision.providerBase.VisionEnhancementProvider):
Expand All @@ -73,10 +80,12 @@ def canStart(cls):
def __init__(self):
super(VisionEnhancementProvider, self).__init__()
Magnification.MagInitialize()
Magnification.MagShowSystemCursor(False)
Magnification.MagSetFullscreenColorEffect(TRANSFORM_BLACK)

def terminate(self):
super(VisionEnhancementProvider, self).terminate()
Magnification.MagShowSystemCursor(True)
Magnification.MagUninitialize()

def registerEventExtensionPoints(self, extensionPoints):
Expand Down

0 comments on commit 2343000

Please sign in to comment.