Skip to content

Commit 5da41e4

Browse files
authored
Merge b2e928d into 67100aa
2 parents 67100aa + b2e928d commit 5da41e4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

source/eventHandler.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,15 @@ def shouldAcceptEvent(eventName, windowHandle=None):
499499

500500
fg = winUser.getForegroundWindow()
501501
fgClassName=winUser.getClassName(fg)
502-
if wClass == "NetUIHWND" and fgClassName in ("Net UI Tool Window Layered","Net UI Tool Window"):
502+
if (
503503
# #5504: In Office >= 2013 with the ribbon showing only tabs,
504504
# when a tab is expanded, the window we get from the focus object is incorrect.
505505
# This window isn't beneath the foreground window,
506-
# so our foreground application checks fail.
506+
wClass == "NetUIHWND" and fgClassName in ("Net UI Tool Window Layered", "Net UI Tool Window")
507+
# #14916: The context menu in the Edge download window isn't beneath the foreground window.
508+
or wClass == "Chrome_WidgetWin_2" and fgClassName == "Chrome_WidgetWin_2"
509+
):
510+
# Our foreground application checks fail.
507511
# Just compare the root owners.
508512
if winUser.getAncestor(windowHandle, winUser.GA_ROOTOWNER) == winUser.getAncestor(fg, winUser.GA_ROOTOWNER):
509513
return True

0 commit comments

Comments
 (0)