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

Add a appModule for taskMan, to fix some bugs in windows ten. #8147

Merged
merged 2 commits into from Apr 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions source/appModules/taskmgr.py
@@ -0,0 +1,32 @@
#appModules/taskmgr.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2018 NV Access Limited, Derek Riemer
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

import appModuleHandler
from NVDAObjects import NVDAObject
from NVDAObjects.UIA import UIA

def isChildOfRow(obj):
"""
calculates obj's ancestors , discovering if this is a child of a row.
If obj is a child of a row, this returns true.
"""
while obj.parent and obj.parent.presentationType != obj.presType_content:
if isinstance(obj.parent, UIA) and obj.parent.UIAElement.CachedAutomationID == u"TmViewRow":
return True
obj = obj.parent
return False

class BrokenUIAChild(UIA):
#This is A child which is layout, but should be content.
presentationType = NVDAObject.presType_content

class AppModule(appModuleHandler.AppModule):
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
if isinstance(obj, UIA) and obj.UIAElement.CachedAutomationID == u"TmRowIcon":
#This is an icon and really is layout. Don't show it.
return
if obj.presentationType == obj.presType_layout and isChildOfRow(obj):
clsList.insert(0, BrokenUIAChild)