Skip to content

Windows 11: suppress UIA focus event on InputSite pane window when switching tasks#12944

Merged
seanbudd merged 3 commits into
nvaccess:masterfrom
josephsl:i12648win11TaskSwitchingPane
Oct 18, 2021
Merged

Windows 11: suppress UIA focus event on InputSite pane window when switching tasks#12944
seanbudd merged 3 commits into
nvaccess:masterfrom
josephsl:i12648win11TaskSwitchingPane

Conversation

@josephsl

Copy link
Copy Markdown
Contributor

Hi,

Would it be possible to put this into 2021.3 unless it should be delayed to 2022.1?

Link to issue number:

Closes #12648

Summary of the issue:

When switching tasks in Windows 11, a "pane" window gets focused instead of the app being switched to in some cases.

Description of how this pull request fixes the issue:

Treat InputSite window class window as a Windows 10 MultitaskingViewFrameWindow object which suppresses UIA focus event.

Testing strategy:

Manual testing on Windows 11 (prerequisite: Windows App Essentials add-on must be disabled):

  1. Without the patch applied, try switching between tasks.
  2. With the patch applied, try switching between tasks.

Expected: NVDA will say "pane" in scenario 1, whereas NVDA will not say "pane" in scenario 2 when switching tasks.

Known issues with pull request:

None yet

Change log entries:

Bug fixes:

In Windows 11, NVDA will no longer announce "pane" when pressing Alt+Tab to switch between programs. (#12648)

Code Review Checklist:

  • Pull Request description:
    • description is up to date
      -xchange log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

Additional context:

This problem was reported on Feedback Hub several months ago. This PR was originally part of Wnidows App Essentials add-on but was delayed to see if newer Windows 11 builds resolves it (not resolved so far).

Thanks.

…e window in Windows 11. Re nvaccess#12648.

When switching tasks in Windows 11, sometimes an unknown 'pane' window gets focused instead of the app being switched to. Therefore detect this pane window and treat it as a Windows 10 multitasking view frame window which suppresses UIA focus event.
@josephsl josephsl requested a review from a team as a code owner October 17, 2021 01:57
@josephsl josephsl requested a review from seanbudd October 17, 2021 01:57
@josephsl

Copy link
Copy Markdown
Contributor Author

CC @codeofdusk

@josephsl josephsl changed the title Windows 11: suppress UIA focus event on InputSite pane window Windows 11: suppress UIA focus event on InputSite pane window when switching tasks Oct 17, 2021
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 3515249bf6

@lukaszgo1

lukaszgo1 commented Oct 17, 2021

Copy link
Copy Markdown
Contributor

+1 for merging into 2021.3 if possible - this problem is quite annoying when using win 11.

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @josephsl

@seanbudd seanbudd merged commit c9d1799 into nvaccess:master Oct 18, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Oct 18, 2021
@josephsl josephsl deleted the i12648win11TaskSwitchingPane branch November 24, 2021 04:18
@ivnc

ivnc commented Mar 2, 2022

Copy link
Copy Markdown
Contributor

A Spanish-speaking user has contacted us, reporting that he hears the message "Task Switching" when switching between windows in Windows 11, although in most cases NVDA only speaks the initial "T". Log fragment follows ("Conmutación de tareas" is "Task Switching" in Spanish). According to his report, this is reproducible also with add-ons disabled. Could the PR be related to this?
NVDA 2021.3.3, Windows 11 21H2 (x64) build 22000.527, not reproducible in Windows 10 (by same user nor me).
IO - inputCore.InputManager.executeGesture (15:05:29.118) - winInputHook (10668):
Input: kb(laptop):alt+tab
IO - speech.speech.speak (15:05:29.181) - MainThread (5260):
Speaking ['Conmutación de tareas', CancellableSpeech (still valid)]
IO - speech.speech.speak (15:05:29.221) - MainThread (5260):
Speaking ['La Sala de Juegos [(xxx)]', 'fila 1', 'columna 1', '1 de 2', CancellableSpeech (still valid)]
DEBUGWARNING - IAccessibleHandler.internalWinEventHandler._shouldGetEvents (15:05:29.734) - MainThread (5260):
Foreground took too long to change. Foreground still 131982 (wxWindowNR). Should be 393430 (WorkerW)
IO - speech.speech.speak (15:05:29.781) - MainThread (5260):
Speaking ['La Sala de Juegos [(xxx)]', CancellableSpeech (still valid)]
IO - speech.speech.speak (15:05:29.813) - MainThread (5260):
Speaking ['Menú', 'lista', CancellableSpeech (still valid)]
IO - speech.speech.speak (15:05:29.817) - MainThread (5260):
Speaking ['Tirar 6 dados', CancellableSpeech (still valid)]

@josephsl

josephsl commented Mar 2, 2022 via email

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows 11: a "pane" window gets focus when switching to certain apps, including Command Prompt

6 participants