https://bugs.winehq.org/show_bug.cgi?id=56582
Bug ID: 56582 Summary: vb3 combobox regression: single click scrolls twice Product: Wine Version: 9.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: winehq@jonass.user.lysator.liu.se Distribution: ---
Created attachment 76338 --> https://bugs.winehq.org/attachment.cgi?id=76338 example exe
The combobox used in applications created with Visual Basic 3 seems to have got a regression. It is almost impossible for me to scroll a single line using Wine 9, while it is easy using Wine 8.
Open the application, click the Combo to drop down the list of items, Line1 to 8 is shown. Click the down arrow to scroll a single line. The delay before further scrolling is much shorter in Wine 9 than Wine 8. Wine 8 is more true to Windows 98.
I first noticed this in Hogia Hemekonomi but were able to create a small example exe to avoid a long description on how to reproduce.
git bisect suggests it may be related to [bb496ea847bb019067ea4b60b9916378ed6fc452]
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #1 from Jonas winehq@jonass.user.lysator.liu.se --- Example exe requires Vbrun300.dll, install like "winetricks vb3run" or just copy the dll to the same directory as the exe.
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #2 from Jonas winehq@jonass.user.lysator.liu.se --- Created attachment 76339 --> https://bugs.winehq.org/attachment.cgi?id=76339 bisect log
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #3 from Jonas winehq@jonass.user.lysator.liu.se --- Tested on Ubuntu 22.04.4 LTS and Debian 12.
https://bugs.winehq.org/show_bug.cgi?id=56582
Jonas winehq@jonass.user.lysator.liu.se changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression, win16
https://bugs.winehq.org/show_bug.cgi?id=56582
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://bugs.winehq.org/att | |achment.cgi?id=76338 CC| |rbernon@codeweavers.com Regression SHA1| |bb496ea847bb019067ea4b60b99 | |16378ed6fc452
--- Comment #4 from Ken Sharp imwellcushtymelike@gmail.com --- Are you able to provide the source code for the attached exe? It will help developers with fixing the issue.
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #5 from Ken Sharp imwellcushtymelike@gmail.com --- Is this the affected app? https://appdb.winehq.org/objectManager.php?sClass=application&iId=4366 Do you know which version is affected?
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #6 from Jonas winehq@jonass.user.lysator.liu.se --- Created attachment 76341 --> https://bugs.winehq.org/attachment.cgi?id=76341 Source for example exe
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #7 from Jonas winehq@jonass.user.lysator.liu.se --- (In reply to Ken Sharp from comment #5)
Is this the affected app? https://appdb.winehq.org/objectManager.php?sClass=application&iId=4366
Correct
Do you know which version is affected?
At least version 3.06
https://bugs.winehq.org/show_bug.cgi?id=56582
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
https://bugs.winehq.org/show_bug.cgi?id=56582
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #8 from Fabian Maurer dark.shadow4@web.de --- Created attachment 76447 --> https://bugs.winehq.org/attachment.cgi?id=76447 Test case
FWIW, this is neither a win16 nor a visual basic issue. I added a sample using a win32 combobox, it has the same behavior. The delay when pressing the scrollbar button is completely gone.
https://bugs.winehq.org/show_bug.cgi?id=56582
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #76447|0 |1 is obsolete| |
--- Comment #9 from Fabian Maurer dark.shadow4@web.de --- Created attachment 76448 --> https://bugs.winehq.org/attachment.cgi?id=76448 Test case
https://bugs.winehq.org/show_bug.cgi?id=56582
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #10 from Fabian Maurer dark.shadow4@web.de --- .
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #11 from Fabian Maurer dark.shadow4@web.de --- Problem occurs in this part of the code:
do { if (!NtUserGetMessage( &msg, 0, 0, 0 )) break; if (NtUserCallMsgFilter( &msg, MSGF_SCROLLBAR )) continue; if (msg.message == WM_LBUTTONUP || msg.message == WM_MOUSEMOVE || msg.message == WM_MOUSELEAVE || msg.message == WM_NCMOUSEMOVE || msg.message == WM_NCMOUSELEAVE || (msg.message == WM_SYSTIMER && msg.wParam == SCROLL_TIMER)) { pt.x = (short)LOWORD( msg.lParam ) - rect.left; pt.y = (short)HIWORD( msg.lParam ) - rect.top; handle_scroll_event( hwnd, scrollbar, msg.message, pt ); }
There is two delays:
/* Delay (in ms) before first repetition when holding the button down */ #define SCROLL_FIRST_DELAY 200
/* Delay (in ms) between scroll repetitions */ #define SCROLL_REPEAT_DELAY 50
The timer is set like follows:
NtUserSetSystemTimer( hwnd, SCROLL_TIMER, msg == WM_LBUTTONDOWN ? SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY );
So, when we get a WM_MOUSEMOVE, the timer will be set to the shorter repeat relay. Now, due to the regression, we get that WM_MOUSEMOVE instantly. Ir comes from:
BOOL release_capture(void) { HWND previous = NULL; BOOL ret;
ret = set_capture_window( 0, 0, &previous ); /* Somebody may have missed some mouse movements */ if (ret && previous) { INPUT input = { .type = INPUT_MOUSE }; input.mi.dwFlags = MOUSEEVENTF_MOVE; NtUserSendInput( 1, &input, sizeof(input) ); }
This is injected intentionally. Now it breaks the scrolling logic though.
https://bugs.winehq.org/show_bug.cgi?id=56582
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |171e0adde5f9fc675b9f7d3ec10 | |dae20cb4b0156 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #12 from Rémi Bernon rbernon@codeweavers.com --- I think this is fixed with 171e0adde5f9fc675b9f7d3ec10dae20cb4b0156, thanks Fabian!
https://bugs.winehq.org/show_bug.cgi?id=56582
--- Comment #13 from Jonas winehq@jonass.user.lysator.liu.se --- Thanks!
https://bugs.winehq.org/show_bug.cgi?id=56582
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.10.
https://bugs.winehq.org/show_bug.cgi?id=56582
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.0.x