http://bugs.winehq.org/show_bug.cgi?id=12106
Summary: Safari menus cannot be activated with keyboard shortcuts Product: Wine Version: CVS/GIT Platform: PC URL: http://www.apple.com/safari/ OS/Version: Linux Status: UNCONFIRMED Keywords: download Severity: enhancement Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: thestig@google.com
With today's git and Safari 3.1, I can only activate the menu with the mouse. Once the menu is open, I can navigate it with the keyboard just fine. However, I cannot bring up the menu with the keyboard by pressing for instance, alt, alt + F, or alt + v.
http://bugs.winehq.org/show_bug.cgi?id=12106
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Austin English austinenglish@gmail.com 2008-06-14 13:23:08 --- Confirming. For me in 1.0-rc5, I can alt+f/v, and it'll go to view, but pressing down doesn't bring up the menu, instead switching to a different menu option (from view to window, for instance). Pressing space brings up the window menu (close/move/resize/etc.)
http://bugs.winehq.org/show_bug.cgi?id=12106
--- Comment #2 from Austin English austinenglish@gmail.com 2008-11-29 01:19:38 --- Comment 1 still applies in git.
http://bugs.winehq.org/show_bug.cgi?id=12106
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified
--- Comment #3 from Austin English austinenglish@gmail.com 2009-01-19 15:14:31 --- Removing deprecated CVS/GIT version tag. Please retest in current git. If the bug is still present in today's wine, but was not present in some earlier version of wine, please update version field to earliest known version of wine that had the bug. Thanks!
http://bugs.winehq.org/show_bug.cgi?id=12106
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |0.9.57.
--- Comment #4 from Lei Zhang thestig@google.com 2009-01-26 16:18:18 --- Still a problem with Safari 3.2 and Wine 1.1.13.
http://bugs.winehq.org/show_bug.cgi?id=12106
--- Comment #5 from Austin English austinenglish@gmail.com 2010-07-18 02:19:51 --- Still present in 1.2.
http://bugs.winehq.org/show_bug.cgi?id=12106
butraxz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |butraxz@gmail.com
--- Comment #6 from butraxz@gmail.com 2012-05-17 15:26:34 CDT --- This bug has not been updated for two years. Is this still an issue i current (1.5.4) or newer wine ? You may also close this as abandoned if you feel that that this is issue is no longer relevant to you.
http://bugs.winehq.org/show_bug.cgi?id=12106
--- Comment #7 from Lei Zhang thestig@google.com 2012-05-20 19:05:27 CDT --- Still a problem with Safari 5.1.7. You need to go to the gear box and turn on "show menu bar".
http://bugs.winehq.org/show_bug.cgi?id=12106
Ken Sharp kennybobs@o2.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial
https://bugs.winehq.org/show_bug.cgi?id=12106
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.apple.com/safari |http://www.oldapps.com/appl |/ |e_safari.php?old_safari=12 CC| |focht@gmx.net Component|-unknown |comctl32 Summary|Safari menus cannot be |Safari 3.x/5.x menu |activated with keyboard |keyboard shortcuts (ALT + |shortcuts |menu mnemonic character) | |don't work correctly Severity|trivial |minor
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
http://www.question-defense.com/2010/02/14/safari-shortcuts-for-the-safari-w...
http://dmcritchie.mvps.org/firefox/keyboard.htm (other browsers such as 'Safari' are also listed in the table)
All other non menu-navigating shortcuts ('CTRL+<option>', see links) work fine.
'ALT' alone activates the main menu 'ALT+w' -> 'File' 'ALT+h' -> 'Edit' 'ALT+f' -> 'View' 'ALT+e' -> 'History' 'ALT+v' -> 'Bookmarks' 'ALT+i' -> 'Window' 'ALT+b' -> 'Help' 'ALT+g' -> address field 'Return' -> jumps two menus right
The menu bar is owner-drawn hence it requires WM_MENUCHAR message processing (unlike traditional accelerator translation).
WM_MENUCHAR with the ASCII character code pressed:
'ALT+h' -> WM_MENUCHAR 0x68 -> 'h' (resulting in 'Edit' selection) 'ALT+f' -> WM_MENUCHAR 0x66 -> 'f' (resulting in 'View' selection) 'ALT+e' -> WM_MENUCHAR 0x45 -> 'e' (resulting in 'History' selection)
Safari doesn't handle this message on its own, it passes it down to common controls, specifically menubar/toolbar control.
+toolbar gives a better overview:
--- snip --- ... 0009:trace:toolbar:TOOLBAR_DumpToolbar toolbar 0x1006e at line 1106, exStyle=00000000, buttons=7, bitmaps=0, strings=1, style=5600984d 0009:trace:toolbar:TOOLBAR_DumpToolbar toolbar 0x1006e at line 1106, himlInt=(nil), himlDef=0x14f010, himlHot=(nil), himlDis=(nil), redrawable=TRUE 0009:trace:toolbar:TOOLBAR_DumpButton button 0 id 0, bitmap=0, state=04, style=18, data=00000000, stringid=0x0014ee00 0009:trace:toolbar:TOOLBAR_DumpButton string L"&File" 0009:trace:toolbar:TOOLBAR_DumpButton button 0 id 0, hot=FALSE, row=0, rect=((0,0)-(34,20)) 0009:trace:toolbar:TOOLBAR_DumpButton button 1 id 1, bitmap=0, state=04, style=18, data=00000000, stringid=0x0014f300 0009:trace:toolbar:TOOLBAR_DumpButton string L"&Edit" 0009:trace:toolbar:TOOLBAR_DumpButton button 1 id 1, hot=FALSE, row=0, rect=((34,0)-(70,20)) 0009:trace:toolbar:TOOLBAR_DumpButton button 2 id 2, bitmap=0, state=04, style=18, data=00000000, stringid=0x0014f318 0009:trace:toolbar:TOOLBAR_DumpButton string L"&View" 0009:trace:toolbar:TOOLBAR_DumpButton button 2 id 2, hot=FALSE, row=0, rect=((70,0)-(110,20)) 0009:trace:toolbar:TOOLBAR_DumpButton button 3 id 3, bitmap=0, state=04, style=18, data=00000000, stringid=0x0014f1e0 0009:trace:toolbar:TOOLBAR_DumpButton string L"H&istory" 0009:trace:toolbar:TOOLBAR_DumpButton button 3 id 3, hot=FALSE, row=0, rect=((110,0)-(165,20)) 0009:trace:toolbar:TOOLBAR_DumpButton button 4 id 4, bitmap=0, state=04, style=18, data=00000000, stringid=0x0014f200 0009:trace:toolbar:TOOLBAR_DumpButton string L"&Bookmarks" 0009:trace:toolbar:TOOLBAR_DumpButton button 4 id 4, hot=FALSE, row=0, rect=((165,0)-(240,20)) 0009:trace:toolbar:TOOLBAR_DumpButton button 5 id 5, bitmap=0, state=04, style=18, data=00000000, stringid=0x0014f220 0009:trace:toolbar:TOOLBAR_DumpButton string L"&Window" 0009:trace:toolbar:TOOLBAR_DumpButton button 5 id 5, hot=FALSE, row=0, rect=((240,0)-(297,20)) 0009:trace:toolbar:TOOLBAR_DumpButton button 6 id 6, bitmap=0, state=04, style=18, data=00000000, stringid=0x0014f290 0009:trace:toolbar:TOOLBAR_DumpButton string L"&Help" 0009:trace:toolbar:TOOLBAR_DumpButton button 6 id 6, hot=FALSE, row=0, rect=((297,0)-(337,20)) 0009:trace:toolbar:TOOLBAR_SendNotify to window 0x10068, code=fffffff4, via Unicode --- snip ---
Pressing 'ALT' key correctly gives 'File' selection ('hot=true'):
--- snip --- 0009:trace:toolbar:TOOLBAR_DumpButton button 0 id 0, bitmap=0, state=04, style=18, data=00000000, stringid=0x0014ee00 0009:trace:toolbar:TOOLBAR_DumpButton string L"&File" 0009:trace:toolbar:TOOLBAR_DumpButton button 0 id 0, hot=TRUE, row=0, rect=((0,0)-(34,20)) --- snip ---
Pressing 'ALT+e' also maps it correctly to button id=1 ('Edit' menu)
--- snip --- Wine-dbg>bt Backtrace: =>0 0x7dedb123 TOOLBAR_MapAccelerator+0x130(infoPtr=0x14dc40, wAccel=0x65, pIDButton=0x33ed0c) [/home/focht/projects/wine/wine.repo/src/dlls/comctl32/toolbar.c:3846] in comctl32 (0x0033e9a8) 1 0x7dee295f ToolbarWindowProc+0xc5d(hwnd=<couldn't compute location>, uMsg=<couldn't compute location>, wParam=<couldn't compute location>, lParam=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/comctl32/toolbar.c:6560] in comctl32 (0x0033ea08) 2 0x7ebbeb5a WINPROC_wrapper+0x19() in user32 (0x0033ea48) 3 0x7ebbeccf call_window_proc+0xcc(hwnd=0x10068, msg=0x45a, wp=0x65, lp=0x33ed0c, result=0x33eab8, arg=0x7dee1d01) [/home/focht/projects/wine/wine.repo/src/dlls/user32/winproc.c:244] in user32 (0x0033ea88) 4 0x7ebc1123 CallWindowProcW+0x69(func=0x7dee1d01, hwnd=0x10068, msg=0x45a, wParam=0x65, lParam=0x33ed0c) [/home/focht/projects/wine/wine.repo/src/dlls/user32/winproc.c:981] in user32 (0x0033eacc) 5 0x00494175 in safari (+0x94174) (0x0033ed0c)
...
Wine-dbg>info locals 0x7dedb123 TOOLBAR_MapAccelerator+0x130: (0033e9a8) TOOLBAR_INFO* infoPtr=0x14dc40 (parameter [EBP+8]) WCHAR wAccel=0x65 (parameter [EBP-44]) UINT* pIDButton=0x33ed0c (parameter [EBP+16]) WCHAR --none--[3] wszAccel={0x26, 0x65, 0} (local [EBP-38]) int i=0x1 (local [EBP-12]) TBUTTON_INFO* btnPtr=0x14de44 (local [EBP-28]) int iLen=0x2 (local [EBP-32]) LPCWSTR lpszStr="&Edit" (local [EBP-16])
Wine-dbg>p *btnPtr {iBitmap=0, idCommand=0x1, fsState=4, fsStyle=24, bHot=0, bDropDownPressed=0, dwData=0, iString=0x14d3b0, nRow=0, rect={left=0x22, top=0, right=0x46, bottom=0x14}, cx=0} --- snip ---
Remembering toolbar notifications as important part I looked around for information on NM_xxx and TBN_xxx notifications:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb760435%28v=vs.85%2...
On a whim I tried 'winetricks -q comctl32' ... jackpot. It makes the menu keyboard shortcut handling fully functional.
I have the gut feeling we are missing notifications here that need to be sent to parent as part of accelerator mapping handling.
$ sha1sum SafariSetup323.exe 54b707e636557720d52526e33262e1a44e8093a6 SafariSetup323.exe
$ du -sh SafariSetup323.exe 20M SafariSetup323.exe
$ wine --version wine-1.7.21-19-g8812193
Regards