Skip to content

Commit 5033c9e

Browse files
authored
Merge 225aef7 into 0a6806a
2 parents 0a6806a + 225aef7 commit 5033c9e

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

source/NVDAObjects/UIA/__init__.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# A part of NonVisual Desktop Access (NVDA)
22
# This file is covered by the GNU General Public License.
33
# See the file COPYING for more details.
4-
# Copyright (C) 2009-2020 NV Access Limited, Joseph Lee, Mohammad Suliman,
4+
# Copyright (C) 2009-2021 NV Access Limited, Joseph Lee, Mohammad Suliman,
55
# Babbage B.V., Leonard de Ruijter, Bill Dengler
66

77
"""Support for UI Automation (UIA) controls."""
@@ -1832,6 +1832,24 @@ def event_UIA_notification(self, notificationKind=None, notificationProcessing=U
18321832
speech.cancelSpeech()
18331833
ui.message(displayString)
18341834

1835+
def event_UIA_dragComplete(self):
1836+
"""
1837+
Raised by an element when a drag operation on it is completed.
1838+
A prominent example is rearranging Start screen tiles on Windows 8 and later.
1839+
"""
1840+
# #12271: speech does not report new location but braille does.
1841+
self.reportFocus()
1842+
1843+
def event_UIA_droptTargetDropped(self):
1844+
"""
1845+
Raised by a containing element such as a list when an element is dragged over another element.
1846+
A prominent example is rearranging quick actions in Windows 10 Action Center.
1847+
"""
1848+
# #12271: unlike drag complete event, it is a different element that raises this event.
1849+
# but NVDA does record the newly dragged element as focused object.
1850+
api.getFocusObject().reportFocus()
1851+
1852+
18351853
class TreeviewItem(UIA):
18361854

18371855
def _get_value(self):

source/_UIAHandler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@
189189
#UIA_ToolTipClosedEventId:"hide",
190190
UIA_Window_WindowOpenedEventId:"UIA_window_windowOpen",
191191
UIA_SystemAlertEventId:"UIA_systemAlert",
192+
UIA_Drag_DragCompleteEventId: "UIA_dragComplete",
193+
UIA_DropTarget_DroppedEventId: "UIA_droptTargetDropped",
192194
}
193195

194196
localEventHandlerGroupUIAEventIds = set()

0 commit comments

Comments
 (0)