diff --git a/source/NVDAObjects/IAccessible/__init__.py b/source/NVDAObjects/IAccessible/__init__.py index 9a72d16f5b8..1242e1f9b17 100644 --- a/source/NVDAObjects/IAccessible/__init__.py +++ b/source/NVDAObjects/IAccessible/__init__.py @@ -33,7 +33,6 @@ from NVDAObjects import NVDAObject, NVDAObjectTextInfo, InvalidNVDAObject import NVDAObjects.JAB import eventHandler -import core from NVDAObjects.behaviors import ProgressBar, Dialog, EditableTextWithAutoSelectDetection, FocusableUnfocusableContainer, ToolTip, Notification from locationHelper import RectLTWH @@ -1935,28 +1934,9 @@ def event_alert(self): speech.speakObject(child,reason=controlTypes.REASON_FOCUS) child=child.simpleNext -class Desktop(IAccessible): - """ - An IAccessible overlay class for the Desktop (root of all windows on the system). - """ - - # In the past, The Desktop NVDAObject was just a Window, not IAccessible. - # But now with the introduction of Virtual Desktops in Windows 10, Desktops can have names, thus why IAccessible is used. - # But, we still want to maintain compatibility with the existing tree structure, thus its role is still Window, and it has no parent, next or previous objects. - role=controlTypes.ROLE_WINDOW - parent=None - next=None - previous=None - - def event_nameChange(self): - # Instruct eventHandler to detect and handle a possible desktop name change, if it has not already. - # It is slightly delayed just in case a focus event is already going to occur, which will handle the name change itself. - core.callLater(250,eventHandler.handlePossibleDesktopNameChange) - ###class mappings _staticMap={ - ("#32769",oleacc.ROLE_SYSTEM_CLIENT):"Desktop", ("ReBarWindow32",oleacc.ROLE_SYSTEM_CLIENT):"ReBarWindow32Client", ("Static",oleacc.ROLE_SYSTEM_STATICTEXT):"StaticText", ("msctls_statusbar32",oleacc.ROLE_SYSTEM_STATICTEXT):"StaticText", diff --git a/source/NVDAObjects/window/__init__.py b/source/NVDAObjects/window/__init__.py index 7cde798fb53..78858edcf8e 100644 --- a/source/NVDAObjects/window/__init__.py +++ b/source/NVDAObjects/window/__init__.py @@ -84,6 +84,9 @@ class Window(NVDAObject): def getPossibleAPIClasses(cls,kwargs,relation=None): windowHandle=kwargs['windowHandle'] windowClassName=winUser.getClassName(windowHandle) + #The desktop window should stay as a window + if windowClassName=="#32769": + return #If this window has a ghost window its too dangerous to try any higher APIs if GhostWindowFromHungWindow and GhostWindowFromHungWindow(windowHandle): return diff --git a/source/eventHandler.py b/source/eventHandler.py index 9f013ff7619..6f724c293ef 100755 --- a/source/eventHandler.py +++ b/source/eventHandler.py @@ -5,8 +5,6 @@ #Copyright (C) 2007-2017 NV Access Limited, Babbage B.V. import threading -import winVersion -import ui import queueHandler import api import speech @@ -26,22 +24,6 @@ _pendingEventCountsByNameAndObj={} # Needed to ensure updates are atomic, as these might be updated from multiple threads simultaneously. _pendingEventCountsLock=threading.RLock() -_lastDesktopName=None - -def handlePossibleDesktopNameChange(): - """ - Reports the new virtual desktop name if changed. - On Windows versions lower than Windows 10, this function does nothing. - """ - global _lastDesktopName - # Desktop switch reporting can only be supported on Windows 10 May 2019 Update and above, - # As previous Windows builds could experience delays and incorrect desktop names. - if winVersion.winVersion>=(10,0,18334): - import UIAHandler - newName=UIAHandler.handler.rootElement.currentName - if newName!=_lastDesktopName: - ui.message(newName) - _lastDesktopName=newName #: the last object queued for a gainFocus event. Useful for code running outside NVDA's core queue lastQueuedFocusObject=None @@ -190,7 +172,6 @@ def doPreGainFocus(obj,sleepMode=False): newForeground=obj api.setForegroundObject(newForeground) executeEvent('foreground',newForeground) - handlePossibleDesktopNameChange() if sleepMode: return True #Fire focus entered events for all new ancestors of the focus if this is a gainFocus event for parent in globalVars.focusAncestors[globalVars.focusDifferenceLevel:]: diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index 5d08390813d..7ae756b3b41 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -24,7 +24,6 @@ What's New in NVDA - Browse mode keystrokes are slow to respond. - For braille display drivers that support it, driver settings can now be changed from the braille settings category in NVDA's settings dialog. (#7452) - Freedom Scientific braille displays are now supported by braille display auto detection. (#7727) -- The name of the current virtual desktop on windows 10 May 2019update is now reported when switching virtual desktops. (#5641) - Added a command to show the replacement for the symbol under the review cursor. (#9286) - Added an experimental option to the Advanced Settings panel that allows you to try out a new, work-in-progress rewrite of NVDA's Windows Console support using the Microsoft UI Automation API. (#9614)