http://bugs.winehq.org/show_bug.cgi?id=26560
Summary: Amazon MP3 Downloader: Menus don't work. Product: Wine Version: 1.3.16 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: adys.wh@gmail.com
From bug 18708.
Menus don't work. Opening them works, but you cannot click any item. Right-clicking them works.
http://bugs.winehq.org/show_bug.cgi?id=26560
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://amazonm-002.vo.llnwd | |.net/u/d1/clients/AmazonMP3 | |Installer_1.0.3.exe?httpHea | |der%5FContent-Disposition=a | |ttachment%3B%20filename%3DA | |mazonMP3Installer.exe&marke | |tplace=1
http://bugs.winehq.org/show_bug.cgi?id=26560
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.3.16 |1.1.22
http://bugs.winehq.org/show_bug.cgi?id=26560
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2011-03-28 00:28:16 CDT --- Is there any reason that you've changed Wine version from 1.3.16 to 1.1.22 ?
http://bugs.winehq.org/show_bug.cgi?id=26560
--- Comment #2 from Jerome Leclanche adys.wh@gmail.com 2011-03-28 00:33:47 CDT --- (In reply to comment #1)
Is there any reason that you've changed Wine version from 1.3.16 to 1.1.22 ?
Forked the bug off bug 18708 which had that version.
http://bugs.winehq.org/show_bug.cgi?id=26560
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.1.22 |1.3.16
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2011-03-28 00:55:48 CDT --- Then let's set version to 1.3.16 since you've tested with that version and this is not a regression.
http://bugs.winehq.org/show_bug.cgi?id=26560
--- Comment #4 from Jerome Leclanche adys.wh@gmail.com 2011-07-27 18:40:10 CDT --- Still an issue in wine-1.3.25-115-g185c435
https://bugs.winehq.org/show_bug.cgi?id=26560
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Component|-unknown |user32 Summary|Amazon MP3 Downloader: |Amazon MP3 Downloader: left |Menus don't work. |mouse click on menus | |doesn't work (WM_MENUSELECT | |message not seen by app | |hook during popup menu | |tracking) Ever confirmed|0 |1
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
The app installs a WH_MSGFILTER type hook with SetWindowsHookExW() and calls TrackPopupMenuEx() with flags (TPM_RIGHTBUTTON|TPM_LEFTALIGN|TPM_TOPALIGN|TPM_VERTICAL|TPM_VERPOSANIMATION), meaning that both, right and left mouse button click should have the same effect.
Right mouse click works:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Amazon/MP3 Downloader
$ WINEDEBUG=+tid,+seh,+relay,+msg,+win,+menu wine ./AmazonMP3Downloader.exe
log.txt 2>&1
... 0025:Call user32.SetWindowsHookExW(ffffffff,004baa70,00000000,00000025) ret=004badae 0025:Ret user32.SetWindowsHookExW() retval=000100ec ret=004badae 0025:Call user32.TrackPopupMenuEx(00010084,00001042,00000153,000000f2,00020076,0032f83c) ret=004bade1 0025:trace:menu:TrackPopupMenuEx hmenu 0x10084 flags 1042 (339,242) hwnd 0x20076 lpTpm 0x32f83c rect (339,223)-(379,242) 0025:trace:menu:MENU_InitTracking hwnd=0x20076 hmenu=0x10084 0025:Call window proc 0x4cc4db (hwnd=0x20076,msg=WM_ENTERMENULOOP,wp=00000001,lp=00000000) 0025:Call user32.CallWindowProcW(7159389f,00020076,00000211,00000001,00000000) ret=004ca5ff 0025:Call window proc 0x7159389f (hwnd=0x20076,msg=WM_ENTERMENULOOP,wp=00000001,lp=00000000) ... 0025:trace:msg:peek_message got type 7 msg 205 (WM_RBUTTONUP) hwnd 0x100ee wp 0 lp 0 0025:Call hook proc 0x4baa70 (id=WH_MSGFILTER,code=2,wp=00000000,lp=0032f6c8) 0025:Call user32.CallNextHookEx(000100ec,00000002,00000000,0032f6c8) ret=004baab1 0025:Call hook proc 0x4d0438 (id=WH_MSGFILTER,code=2,wp=00000000,lp=0032f6c8) 0025:Call user32.GetParent(000100ee) ret=004ce1e4 0025:Ret user32.GetParent() retval=0001007c ret=004ce1e4 0025:Call user32.GetParent(000100ee) ret=004cc671 0025:Ret user32.GetParent() retval=0001007c ret=004cc671 0025:Call user32.GetParent(0001007c) ret=004ce1e4 0025:Ret user32.GetParent() retval=00000000 ret=004ce1e4 0025:Call user32.GetParent(0001007c) ret=004cc671 0025:Ret user32.GetParent() retval=00000000 ret=004cc671 0025:Ret hook proc 0x4d0438 (id=WH_MSGFILTER,code=2,wp=00000000,lp=0032f6c8) retval=00000000 0025:Ret user32.CallNextHookEx() retval=00000000 ret=004baab1 0025:Ret hook proc 0x4baa70 (id=WH_MSGFILTER,code=2,wp=00000000,lp=0032f6c8) retval=00000000 0025:trace:menu:MENU_ButtonUp 0x32f6b0 hmenu=0x10084 0025:trace:win:GetWindowRect hwnd 0x100ee (339,242)-(501,334) 0025:trace:menu:do_debug_print_menuitem FocusedItem: { ID=0xe140, State=hi, Text=L"&About..." } 0025:trace:menu:MENU_ExecFocusedItem 0x32f6b0 hmenu=0x10084 0025:trace:menu:MENU_ExecFocusedItem hMenu 0x10084 wID 0000e140 hSubMenu (nil) fType 0000 0025:trace:msg:PostMessageW hwnd 0x20076 msg 111 (WM_COMMAND) wp e140 lp 0 0025:trace:menu:MENU_TrackMenu executedMenuId 57664 ... 0025:trace:menu:MENU_ExitTracking hwnd=0x20076 0025:Call window proc 0x4cc4db (hwnd=0x20076,msg=WM_EXITMENULOOP,wp=00000001,lp=00000000) 0025:Call user32.CallWindowProcW(7159389f,00020076,00000212,00000001,00000000) ret=004ca5ff 0025:Call window proc 0x7159389f (hwnd=0x20076,msg=WM_EXITMENULOOP,wp=00000001,lp=00000000) 0025:Call user32.GetWindowLongA(00020076,00000000) ret=715938b4 0025:Ret user32.GetWindowLongA() retval=00148440 ret=715938b4 0025:Call user32.DefWindowProcW(00020076,00000212,00000001,00000000) ret=71593c5b 0025:Ret user32.DefWindowProcW() retval=00000000 ret=71593c5b 0025:Ret window proc 0x7159389f (hwnd=0x20076,msg=WM_EXITMENULOOP,wp=00000001,lp=00000000) retval=00000000 0025:Ret user32.CallWindowProcW() retval=00000000 ret=004ca5ff 0025:Ret window proc 0x4cc4db (hwnd=0x20076,msg=WM_EXITMENULOOP,wp=00000001,lp=00000000) retval=00000000 0025:Ret user32.TrackPopupMenuEx() retval=00000001 ret=004bade1 0025:Call user32.UnhookWindowsHookEx(000100ec) ret=004baded 0025:Ret user32.UnhookWindowsHookEx() retval=00000001 ret=004baded ... --- snip ---
Left mouse click (doesn't work):
--- snip --- 0025:trace:msg:peek_message got type 7 msg 202 (WM_LBUTTONUP) hwnd 0x100ee wp 0 lp 0 0025:Call hook proc 0x4baa70 (id=WH_MSGFILTER,code=2,wp=00000000,lp=0032f6c8) 0025:Ret hook proc 0x4baa70 (id=WH_MSGFILTER,code=2,wp=00000000,lp=0032f6c8) retval=00000001 0025:trace:msg:peek_message got type 7 msg 202 (WM_LBUTTONUP) hwnd 0x100ee wp 0 lp 0 0025:Call winex11.drv.MsgWaitForMultipleObjectsEx(00000000,00000000,00000000,000004ff,00000000) ret=7ec19c4b 0025:Ret winex11.drv.MsgWaitForMultipleObjectsEx() retval=00000102 ret=7ec19c4b 0025:Call winex11.drv.MsgWaitForMultipleObjectsEx(00000001,0032f450,ffffffff,000004ff,00000000) ret=7ec19c4b 0025:Ret winex11.drv.MsgWaitForMultipleObjectsEx() retval=00000000 ret=7ec19c4b --- snip ---
The hook eats WM_LBUTTONUP messages during tracking (retval 0x1).
Looking at the app's hook code it seems that WM_MENUSELECT message needs to be seen by the hook (= stores menu item id) before WM_LBUTTONUP is properly processed.
--- snip --- 004BA120 8B4424 04 MOV EAX,DWORD PTR SS:[ESP+4] 004BA124 83EC 08 SUB ESP,8 004BA127 53 PUSH EBX 004BA128 55 PUSH EBP 004BA129 56 PUSH ESI 004BA12A 8BF1 MOV ESI,ECX 004BA12C 8B48 04 MOV ECX,DWORD PTR DS:[EAX+4] ; msg.message 004BA12F 81F9 00020000 CMP ECX,200 ; WM_MOUSEFIRST 004BA135 57 PUSH EDI 004BA136 0F87 42020000 JA 004BA37E 004BA13C 0F84 7E010000 JE 004BA2C0 ; WM_MOUSEMOVE 004BA142 81E9 00010000 SUB ECX,100 ; WM_KEYFIRST 004BA148 74 68 JZ SHORT 004BA1B2 004BA14A 83E9 1F SUB ECX,1F ; WM_MENUSELECT 004BA14D 0F85 06030000 JNZ 004BA459 004BA153 8B48 0C MOV ECX,DWORD PTR DS:[EAX+0C] ; msg.lParam 004BA156 898E 8C000000 MOV DWORD PTR DS:[ESI+8C],ECX 004BA15C 0FB750 08 MOVZX EDX,WORD PTR DS:[EAX+8] ; msg.wParam (id) 004BA160 33C9 XOR ECX,ECX 004BA162 8A48 0A MOV CL,BYTE PTR DS:[EAX+0A] 004BA165 BB 01000000 MOV EBX,1 004BA16A 8915 D0805300 MOV DWORD PTR DS:[5380D0],EDX ; (id) ... 004BA37E 81E9 01020000 SUB ECX,201 ; WM_LBUTTONDOWN 004BA384 74 6E JZ SHORT 004BA3F4 004BA386 49 DEC ECX ; WM_LBUTTONUP 004BA387 0F85 CC000000 JNZ 004BA459 004BA38D A1 D0805300 MOV EAX,DWORD PTR DS:[5380D0] ; msg.wParam (id) 004BA392 85C0 TEST EAX,EAX 004BA394 8BF8 MOV EDI,EAX 004BA396 74 4D JZ SHORT 004BA3E5 004BA398 6A 00 PUSH 0 004BA39A 50 PUSH EAX 004BA39B A1 C8805300 MOV EAX,DWORD PTR DS:[5380C8] 004BA3A0 8B88 8C000000 MOV ECX,DWORD PTR DS:[EAX+8C] 004BA3A6 51 PUSH ECX 004BA3A7 FF15 2C854E00 CALL DWORD PTR DS:[<&USER32.GetMenuState>] ... 004BA3E5 5F POP EDI 004BA3E6 5E POP ESI 004BA3E7 5D POP EBP 004BA3E8 B8 01000000 MOV EAX,1 004BA3ED 5B POP EBX 004BA3EE 83C4 08 ADD ESP,8 004BA3F1 C2 0400 RETN 4 ... --- snip ---
Source: http://source.winehq.org/git/wine.git/blob/77ee42fd330130c55b6b74ab8662a2377...
--- snip --- 2978 static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y, 2979 HWND hwnd, const RECT *lprect ) 2980 { ... 3020 __TRY while (!fEndMenu) 3021 { 3022 menu = MENU_GetMenu( mt.hCurrentMenu ); 3023 if (!menu) /* sometimes happens if I do a window manager close */ 3024 break; 3025 3026 /* we have to keep the message in the queue until it's 3027 * clear that menu loop is not over yet. */ 3028 3029 for (;;) 3030 { 3031 if (PeekMessageW( &msg, 0, 0, 0, PM_NOREMOVE )) 3032 { 3033 if (!CallMsgFilterW( &msg, MSGF_MENU )) break; 3034 /* remove the message from the queue */ 3035 PeekMessageW( &msg, 0, msg.message, msg.message, PM_REMOVE ); 3036 } 3037 else 3038 { 3039 if (!enterIdleSent) 3040 { 3041 HWND win = menu->wFlags & MF_POPUP ? menu->hWnd : 0; 3042 enterIdleSent = TRUE; 3043 SendMessageW( mt.hOwnerWnd, WM_ENTERIDLE, MSGF_MENU, (LPARAM)win ); 3044 } 3045 WaitMessage(); 3046 } 3047 } ... 3068 fRemove = FALSE; 3069 if ((msg.message >= WM_MOUSEFIRST) && (msg.message <= WM_MOUSELAST)) 3070 { ... 3082 switch(msg.message) 3083 { ... 3120 case WM_MOUSEMOVE: 3121 /* the selected menu item must be changed every time */ 3122 /* the mouse moves. */ 3123 3124 if (hmenu) 3125 fEndMenu |= !MENU_MouseMove( &mt, hmenu, wFlags ); 3126 3127 } /* switch(msg.message) - mouse */ 3128 } ... --- snip ---
$ sha1sum AmazonMP3Installer.exe 011887aaffdfe0773b8d9ca9ba0317b3ba883a6e AmazonMP3Installer.exe
$ du -sh AmazonMP3Installer.exe 592K AmazonMP3Installer.exe
$ wine --version wine-1.7.11-159-gee33839
Regards
https://bugs.winehq.org/show_bug.cgi?id=26560
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #6 from super_man@post.com --- Still an issue 1.7.51
https://bugs.winehq.org/show_bug.cgi?id=26560
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |michael@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=26560
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://amazonm-002.vo.llnwd |https://web.archive.org/web |.net/u/d1/clients/AmazonMP3 |/20210824163914if_/https:// |Installer_1.0.3.exe?httpHea |gsf-fl.softonic.com/358/19c |der%5FContent-Disposition=a |/1e50ab7fe4946f2fa854ace6bf |ttachment%3B%20filename%3DA |8e076aae/file?Expires=16298 |mazonMP3Installer.exe&marke |66051&Signature=f1930be1851 |tplace=1 |dfec820d5b5ffae88fb851d4eb3 | |9e&url=https%3A%2F%2Famazon | |-mp3-downloader.en.softonic | |.com&Filename=file
--- Comment #7 from Gijs Vermeulen gijsvrm@gmail.com --- Still present with wine-6.15.
I found a download for version 1.0.0, which needs winver set to winxp, but shows the same issue.
$ sha1sum AmazonMP3Installer.exe 35819c1e50ab7fe4946f2fa854ace6bf8e076aae AmazonMP3Installer.exe
$ du -sh AmazonMP3Installer.exe 576K AmazonMP3Installer.exe
https://bugs.winehq.org/show_bug.cgi?id=26560
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
another archive.org snapshot here:
https://web.archive.org/web/20111216033021/http://amazonm-002.vo.llnwd.net/u...
$ sha1sum AmazonMP3DownloaderInstall.exe 705de541750291a0d7617eb2fe19c841c3ec6138 AmazonMP3DownloaderInstall.exe
$ du -sh AmazonMP3DownloaderInstall.exe 1.6M AmazonMP3DownloaderInstall.exe
Regards