Reproduction steps with distributed CEF client application.
1) Install NVDA, execute NVDA, show NVDA Speech Viewer (NVDA Tray icon -> Tools -> Speech viewer)
2) Execute cefclient.exe
3) you can use NVDA's hotkeys ('q' - show next block)
4) deactivate cefclient(Alt+Tab to different application) and re-activate cefclient.exe (Alt+Tab) back.
5) type hot key 'q' -> hotkey is ignored (probably no widget has focus)
6) press Tab (widget will gain focus) and hotkey 'q' will work again
Expected behavior:
After activating cefclient.exe by pressing Alt+Tab, the NVDA's hotkey should work as in chrome.
This behavior works fine for chrome and Spotify (cef based app).
I think for Spotify - this behavior works fine because their CefBrowser is TopLevel window.
I found implementation of handling WM_ACTIVATE here:
- Code: Select all
src-chromium\ui\views\win\hwnd_message_handler.cc
- Code: Select all
HWNDMessageHandler::OnWndProc(
...
if (message == WM_ACTIVATE && IsTopLevelWindow(window)) {
PostProcessActivateMessage(LOWORD(w_param), !!HIWORD(w_param),
reinterpret_cast<HWND>(l_param));
}
...
PostProcessActivateMessage - is responsible to activating correct widget for accessibility by calling
- Code: Select all
NotifyAccessibilityEvent(ax::mojom::Event::kWindowActivated);
We have a CefBrowser embeded in our native win Window same as in cefclient app.
Any idea.
Could we extend CEF API / modify CEF implementation to allow for Cef based application implement this behavior correctly?
Thank you very much.
JK.