Ticket #28 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

NVDA UI pop-up dialog focus issues

Reported by: jteh Owned by: jteh
Priority: major Milestone: 2009.1
Component: GUI Version: development
Keywords: Cc:
Operating system: Blocked by:
Blocking: #7

Description

There are several issues with regard to foreground focus and NVDA UI pop-up dialogs:

  • While the NVDA UI window is open, pop-up dialogs such as the Exit NVDA dialog intermittently do not come to the foreground so that it is necessary to press alt+tab to access them, as reported in #7.
  • If the NVDA UI window is open, after an NVDA pop-up dialog is dismissed, the focus returns to the NVDA UI window instead of to the window which had the focus before the dialog was popped up.

These are proving to be a little difficult to solve. Some thoughts:

  • All dialogs, including those generated by scriptUI, should have a parent of the NVDA UI window instead of None.
  • When bringing up a scriptUI dialog, if the main UI window is not currently shown, perhaps Show() should be called which should bring it into focus, similar to the code for the Exit NVDA dialog.
  • It seems that winUser.setForegroundWindow() does work quite nicely, despite my earlier findings. This may solve many problems, particularly the second issue described above.
  • All of this fiddly code should be abstracted in some way; i.e. the code to prepare for showing a dialog and the code to restore focus after displaying the dialog.

Change History

Changed 3 years ago by jteh

  • status changed from new to accepted

Changed 3 years ago by jteh

  • status changed from accepted to closed
  • resolution set to fixed

More investigation revealed that SetForegroundWindow() may not work if another process is in the foreground. This is by design, but it means that we can't use this to reliably bring the NVDA window into focus.

The GUI has needed a complete makeover for a while now, so rather than try to fix this issue, I decided to completely rework the GUI. This was committed in r1745. There is now no NVDA main window (everything is done from the system tray), which means that this problem should not occur.

Closing as fixed. If there are further problems, reopen this ticket.

Note: See TracTickets for help on using tickets.