Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions source/NVDAObjects/IAccessible/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions source/NVDAObjects/window/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions source/eventHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:]:
Expand Down
1 change: 0 additions & 1 deletion user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down