nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.11k stars 637 forks source link

NVDA does not automatically start on second desktop #14395

Open yolpsoftware opened 1 year ago

yolpsoftware commented 1 year ago

Steps to reproduce:

Actual behavior:

NVDA does not automatically start on the second Desktop. ctrl+alt+n does not launch NVDA on the second desktop.

Expected behavior:

NVDA should automatically start on the second Desktop. ctrl+alt+n should launch NVDA on the second desktop.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

2022.3.2.27117

Windows version:

Windows 10 Home, 10.0.19044 Build 19044

Name and version of other software in use when reproducing the issue:

Applications that use the CreateDesktop Windows API, see below.

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

no

If NVDA add-ons are disabled, is your problem still occurring?

no add-ons installed

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

yes

Tools that use the CreateDesktop API:

Safe Exam Browser

The problem has first been identified while running the Safe Exam Browser application (https://safeexambrowser.org/):

Safe Exam Browser will create a new Desktop, where its main window will appear. However, the contents of the window are not read by NVDA.

Separate CreateDesktop Tool

To make sure the problem was not limited to SEB, we tested it with a separate tool.

WARNING: you should run this tool in a virtual machine, or save your work before running it, because it might require you to hard-reboot your PC.

The tool will invoke CreateDesktop to create a new desktop. However, the contents of the new desktop are not read by NVDA.

michaelDCurran commented 1 year ago

At very least, you would need to some how launch NVDA on the second desktop in order to read its content. We could have further discussion as to whether or not NVDA should detect this scenario and automatically start itself on the second desktop.

yolpsoftware commented 1 year ago

@michaelDCurran I thought of that. However, it seems that other applications (like e.g. Zoom) are able to work with a second desktop fine. If you are in a Zoom session and share your screen, you always share the currently active desktop. I would expect NVDA to handle this scenario in a similar seamless way. NVDA should read the contents of the currently active window, no matter on which desktop that is.

michaelDCurran commented 1 year ago

I don't follow how sharing the active desktop with Zoom is related to running an app on a second desktop. Are you saying that when you do this, Zoom creates a second desktop?

It is simply a fact of the Windows architecture that in order for a process to interact with windows through window messages and the like, it must be running on the same desktop as those windows. So therefore if a second desktop is created and made active, NVDA would still need to be some how started on that second desktop. The question then is whether or not it is appropriate for an existing NVDA to detect this and force itself to launch on the second desktop. Especially taking into account a major reason a second desktop was used was probably to isolate a process into a controlled environment. This is probably what NVDA should do, but we do need to carefully think through all the ramifications.

yolpsoftware commented 1 year ago

I don't follow how sharing the active desktop with Zoom is related to running an app on a second desktop. Are you saying that when you do this, Zoom creates a second desktop?

No. What I meant was, if I run a Zoom call, then share my desktop to my "Zoommates", and then create a second desktop, Zoom will automatically share the contents of the second desktop, because that is where the user now "is".

michaelDCurran commented 1 year ago

thanks for the clarification.

In that case there is clearly an expectation for NVDA to automatically launch on a second desktop if it becomes the active desktop.

However as I previously stated, we will have to think about security expectations and how this fits into our priorities.

seanbudd commented 1 year ago

Hi @yolpsoftware,

Based on my testing, NVDA works fine on the second desktop. The issue I noticed is that NVDA does not automatically start on the second desktop. How to make NVDA automatically start is not immediately clear, nor does it necessarily make sense as a UX for NVDA.

Unfortunately, ctrl+alt+n also does not work to start NVDA, which definitely should be supported for NVDA. This is assumed to be a Windows bug, as according to the API, shortcuts in the special folder "AllUsersDesktop" are meant to work on ALL desktops. We plan on reporting this bug to Microsoft.

In the meantime, to start NVDA on the second desktop you can:

yolpsoftware commented 1 year ago

@seanbudd in which way are you creating the second desktop? Windows offers two ways:

a) the Virtual Desktop you create by pressing Win + Ctrl + d, or by going to Task View --> New Desktop. b) the second desktop you create by using the CreateDesktop Win32 API.

These are not the same, and this ticket is about case b). In all our tests, NVDA did not read the contents from the second desktop.

seanbudd commented 1 year ago

@yolpsoftware

I am talking about case b. Can you confirm you tried the following work around steps?

yolpsoftware commented 1 year ago

@seanbudd not sure I understand. This is what I do:

Please compare this to the behavior of other software (like Zoom or screen recorders), which automatically record the one desktop where the user currently "is".

Do you mean we need to programmatically launch NVDA on the second desktop?

seanbudd commented 1 year ago

@yolp please read my earlier reply.

Can you confirm that NVDA works when you navigate to the desktop shortcut or start menu item and launch it?

I listed 3 workarounds, programmatically launching is one of them.

yolpsoftware commented 1 year ago

@seanbudd I see. Yes, starting NVDA manually (or programmatically, by the app which created the second desktop) on the second desktop is a workaround, of course (as suggested by Michael Curran and confirmed by me in my first comment).

I was pointing out that other software like Zoom or screen readers do not need to do this. They are automatically reading from the second desktop, because that is where the user currently is.