| Summary: | [Win][MiniBrowser] Accelerator keys don't work unless the main window is focused | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||||||
| Component: | Tools / Tests | Assignee: | Fujii Hironori <Hironori.Fujii> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | achristensen, bfulgham, don.olmstead, pvollan, ross.kirsling, stephan.szabo, webkit-bug-importer, Yousuke.Kimoto | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Fujii Hironori
2020-02-04 23:06:35 PST
Created attachment 389774 [details]
WIP patch
I realized two problems in this WIP patch. 1. Ctrl-W can't close the window while loading a page Ctrl-W should be processed without dispatching to WebKit. 2. accelerator keys don't work if toolbar buttons or URL bar are focused. toolbar buttons should give up WM_SETFOCUS. https://stackoverflow.com/a/18540038 3. By pressing Alt-Tab to switch active windows, the main window gets focused. This is the only way to focus the main window at the moment, but this seems a bug. For example, Windows File Explore restores the previous focus when re-activating. Restoring the previous focus seems a application's task by using WM_ACTIVATE. 4. Ctrl++ (zoom in) and Ctrl+- (zoom out) is effective only for numpad To solve the issue #1, it seems that I should add WM_COMMAND bubble up code in WebView. > case WM_COMMAND: > PostMessage(GetParent(hWnd), message, wParam, lParam); https://stackoverflow.com/a/1963016 Created attachment 389789 [details]
WIP patch
* Split the accelerator table into pre and post.
* WebKit2 WebView bubbles up WM_COMMAND message to the parent
* SetFocus the brower window when WM_ACTIVATE of the main window
issue#2 and issue#4 still remain
Ctrl+R doesn't work for WebKit1 because it doesn't have didNotHandleKeyEvent
Ctrl+W doesn't work for WebKit1 because I din'd add the code bubbling up WM_COMMAND. Shold I add it to WebKit1?
Created attachment 389937 [details]
Patch
Comment on attachment 389937 [details] Patch Clearing flags on attachment: 389937 Committed r255995: <https://trac.webkit.org/changeset/255995> All reviewed patches have been landed. Closing bug. |