Skip to content
Permalink
Browse files

Provide NVDA store app with UIAccess capabilities (#10464)

* appX package: ask to gain UIAccess, and allow audioDucking / touchHandler to be used.

* Fix linting issues.

* appx manifest: update min/max Windows version and set to start after logon.
  • Loading branch information...
michaelDCurran committed Nov 6, 2019
1 parent 5a30d5c commit 8cd9582afd8c31a63eadfa5952c938c558e53811
Showing with 23 additions and 6 deletions.
  1. +16 −3 appx/manifest.xml.subst
  2. +1 −1 appx/sconscript
  3. +5 −1 source/audioDucking.py
  4. +1 −1 source/touchHandler.py
@@ -2,6 +2,7 @@
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
>
<Identity
@@ -22,17 +23,18 @@
<Dependencies>
<TargetDeviceFamily
Name="Windows.Desktop"
MinVersion="10.0.15063.0"
MaxVersionTested="10.0.18362.0"
MinVersion="10.0.18990.0"
MaxVersionTested="10.0.18995.0"
/>
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust"/>
<rescap:Capability Name="uiAccess"/>
</Capabilities>
<Applications>
<Application
Id="mainExecutable"
Executable="nvda_noUIAccess.exe"
Executable="nvda_UIAccess.exe"
EntryPoint="Windows.FullTrustApplication"
>
<uap:VisualElements
@@ -42,6 +44,17 @@
Square44x44Logo="appx_images/nvda_44x44.png"
BackgroundColor="#660099"
/>
<Extensions>
<desktop:Extension
Category="windows.startupTask"
Executable="nvda_UIAccess.exe"
EntryPoint="Windows.FullTrustApplication">
<desktop:StartupTask
TaskId="nvda_uiAccess"
Enabled="true"
DisplayName="%productName%" />
</desktop:Extension>
</Extensions>
</Application>
</Applications>
</Package>
@@ -60,7 +60,7 @@ excludedDistFiles=[
'nvda_eoaProxy.exe',
'nvda_service.exe',
'nvda_slave.exe',
'nvda_uiAccess.exe',
'nvda_noUIAccess.exe',
'lib/IAccessible2Proxy.dll',
'lib/ISimpleDOM.dll',
'lib/minHook.dll',
@@ -6,6 +6,7 @@

import threading
from ctypes import *
from ctypes import oledll
import time
import config
from logHandler import log
@@ -141,7 +142,10 @@ def initialize():
def isAudioDuckingSupported():
global _isAudioDuckingSupported
if _isAudioDuckingSupported is None:
_isAudioDuckingSupported=config.isInstalledCopy() and hasattr(oledll.oleacc,'AccSetRunningUtilityState')
_isAudioDuckingSupported = (
config.isInstalledCopy()
or config.isAppX
) and hasattr(oledll.oleacc, 'AccSetRunningUtilityState')
return _isAudioDuckingSupported

def handlePostConfigProfileSwitch():
@@ -297,7 +297,7 @@ def notifyInteraction(self, obj):
def touchSupported():
"""Returns if the system and current NVDA session supports touchscreen interaction.
"""
if not config.isInstalledCopy():
if not config.isInstalledCopy() and not config.isAppX:
log.debugWarning("Touch only supported on installed copies")
return False
if (winVersion.winVersion.major*10+winVersion.winVersion.minor)<62:

0 comments on commit 8cd9582

Please sign in to comment.
You can’t perform that action at this time.