https://bugs.winehq.org/show_bug.cgi?id=37706
Bug ID: 37706 Summary: ScrollWindowEx() returns ERROR if the window is not visible (in the Windows API sense); real Windows returns NULLREGION Product: Wine Version: 1.7.28 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: pietro10@mac.com Distribution: ---
Created attachment 50192 --> https://bugs.winehq.org/attachment.cgi?id=50192 Sample program that demonstrates bug (source)
I'm using a dummy scroll (as in http://blogs.msdn.com/b/oldnewthing/archive/2003/07/31/54601.aspx) to update the scrollbars in my custom Windows control when necessary. In my test program, this happens before the window is shown for the first time, and in wine, my error checking code triggers because the ScrollWindowEx() call fails with ERROR. This does not happen on real Windows; it instead returns NULLREGION.
The attached program creates several configurations that attempt to reproduce this issue under different circumstances. On wine, I get
ScrollWindowEx() before ShowWindow(nCmdShow): ERROR ScrollWindowEx() after ShowWindow(nCmdShow) and ShowWindow(SW_HIDE): ERROR ScrollWindowEx() after only ShowWindow(nCmdShow): SIMPLEREGION
On Windows XP 32-bit, Windows 7 32-bit, and Windows 7 64-bit, I get
ScrollWindowEx() before ShowWindow(nCmdShow): NULLREGION ScrollWindowEx() after ShowWindow(nCmdShow) and ShowWindow(SW_HIDE): NULLREGION ScrollWindowEx() after only ShowWindow(nCmdShow): SIMPLEREGION
I can't find anything pointing to this use of ScrollWindowEx() being wrong... I also do not know if any other scroll functions are equally affected.
I am running wine-1.7.28 from the Wine PPA on Ubuntu GNOME 14.10.
Thanks.
https://bugs.winehq.org/show_bug.cgi?id=37706
--- Comment #1 from Pietro Gagliardi (andlabs) pietro10@mac.com --- Created attachment 50193 --> https://bugs.winehq.org/attachment.cgi?id=50193 Executable of said example program
https://bugs.winehq.org/show_bug.cgi?id=37706
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- I'm in a Windows 8.1 machine right now, so just to increase tests:
ScrollWindowEx() before ShowWindow(nCmdShow): NULLREGION ScrollWindowEx() after ShowWindow(nCmdShow) and ShowWindow(SW_HIDE): NULLREGION ScrollWindowEx() after only ShowWindow(nCmdShow): SIMPLEREGION
https://bugs.winehq.org/show_bug.cgi?id=37706
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
https://bugs.winehq.org/show_bug.cgi?id=37706
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=37706
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru --- Created attachment 50197 --> https://bugs.winehq.org/attachment.cgi?id=50197 patch
Something like the attached patch should help, but it's probably worth adding some tests.
https://bugs.winehq.org/show_bug.cgi?id=37706
--- Comment #4 from Sebastian Lackner sebastian@fds-team.de --- @Dmitry: Patch works fine here, thx.
https://bugs.winehq.org/show_bug.cgi?id=37706
--- Comment #5 from Pietro Gagliardi (andlabs) pietro10@mac.com --- For documentation purposes, when this does get patched into wine, would someone please point out which version it winds up being patched into? Thanks.
https://bugs.winehq.org/show_bug.cgi?id=37706
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Status|UNCONFIRMED |NEW CC| |focht@gmx.net Ever confirmed|0 |1
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming on behalf of others.
Still present as of Wine 1.7.43
Dmitry's patch is also available/included in Wine-Staging by default:
https://github.com/wine-compholio/wine-staging/blob/master/patches/user32-Sc...
Regards
https://bugs.winehq.org/show_bug.cgi?id=37706
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |michael@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/user32-ScrollW | |indowEx
https://bugs.winehq.org/show_bug.cgi?id=37706
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/user32-ScrollW |er/patches/user32-ScrollWin |indowEx |dowEx CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=37706
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #7 from joaopa jeremielapuree@yahoo.fr --- Bug still occurs with wine-5.3