http://bugs.winehq.org/show_bug.cgi?id=9435
Summary: MDI child window outside main window gives scrollbars Product: Wine Version: CVS/GIT Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-user AssignedTo: wine-bugs@winehq.org ReportedBy: peter@cendio.se
In Wine, if you move a MDI child window outside the borders of the main window, you'll get scrollbars. This does not happen in Windows. This causes problems with some applications which creates MDI child windows that occupies the entire main window area. In this case, scroll windows appears, which obscures parts of the MDI child. Tested with Wine as of 2007-08-23, using http://www.cendio.se/~astrand/wine/11-mdi-scrollbar/mdi1.exe.
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #1 from Peter Åstrand peter@cendio.se 2007-08-24 03:10:11 --- Created an attachment (id=7763) --> (http://bugs.winehq.org/attachment.cgi?id=7763) Shot from Windows
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #2 from Peter Åstrand peter@cendio.se 2007-08-24 03:10:28 --- Created an attachment (id=7764) --> (http://bugs.winehq.org/attachment.cgi?id=7764) Shot from Wine
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #3 from Peter Åstrand peter@cendio.se 2007-08-24 09:45:38 --- I've determined that mdi.c calls SetScrollInfo, which I believe is wrong: This causes the scroll bar to be displayed, even though the MDI Client window was created without WS_VSCROLL/WS_HSCROLL.
I've not determined how to fix mdi.c, though. I think the code paths surrounding this is very strange, especially wrt the sbRecalc variable. In several places, you will find SB_BOTH+1. The result is 4, but there is no corresponding SB_xxx #define for 4. Also, the switch in CalcChildScroll does not handle a value of 4.
This call also looks very strange:
CalcChildScroll(hwnd, ci->sbRecalc-1);
What's the -1 doing there?
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #4 from Peter Åstrand peter@cendio.se 2007-08-27 04:04:32 --- Created an attachment (id=7826) --> (http://bugs.winehq.org/attachment.cgi?id=7826) Patch that fixes the problem
It seems like Windows stores the initial window style and avoids adding scroll bars if the window was created without WS_VSCROLL/WS_HSCROLL. This patch emulates this behaviour. Tested with the mdi1 test application (which creates the MDI client window without WS_*SCROLL) as well as with "sysedit" (which uses WS_*SCROLL).
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #5 from Dmitry Timoshkov dmitry@codeweavers.com 2007-08-27 05:00:35 --- The patch needs a test case. There are at least 2 questions that need to be answered: 1. Who is adding WS_HSCROLL/WS_VSCROLL styles, if they were not specified originally? 2. If that's SetScrollInfo, who does (1) we need a test to see how Windows handles that.
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #6 from Peter Åstrand peter@cendio.se 2007-08-28 04:38:54 ---
- Who is adding WS_HSCROLL/WS_VSCROLL styles, if they were not specified
originally?
SCROLL_ShowScrollBar, which is called from SCROLL_SetScrollInfo, which is called from CalcChildScroll.
http://bugs.winehq.org/show_bug.cgi?id=9435
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |download, patch
--- Comment #7 from Austin English austinenglish@gmail.com 2008-04-15 00:13:31 --- Still present in git. Patch still fixes the issue in git.
Can you post the source to the test app (or better yet, port it to the wine test suite).
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #8 from Peter Åstrand peter@cendio.se 2008-04-15 02:35:36 ---
Can you post the source to the test app
I've seen to have lost the source code. The app was created using the Visual Studio wizard.
http://bugs.winehq.org/show_bug.cgi?id=9435
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|download |
--- Comment #9 from Austin English austinenglish@gmail.com 2008-12-05 02:31:50 --- Download link is busted? Got another one? Can you retest in 1.1.9?
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #10 from Peter Åstrand peter@cendio.se 2008-12-07 08:51:53 --- Try http://www.cendio.com/~astrand/wine/11-mdi-scrollbar/mdi1.exe instead; we'll have temporary web server problem.
Unfortunately, I cannot re-test: This work was done as a consulting project which is currently halted.
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #11 from Austin English austinenglish@gmail.com 2008-12-07 17:20:48 --- Still present in 1.1.10.
http://bugs.winehq.org/show_bug.cgi?id=9435
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=9435
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified
--- Comment #12 from Austin English austinenglish@gmail.com 2009-01-15 10:53:34 --- Removing deprecated CVS/GIT version tag. Please retest in current git. If still present, update version field to earliest known version of wine that had this bug. Thanks!
http://bugs.winehq.org/show_bug.cgi?id=9435
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com
--- Comment #13 from Jerome Leclanche adys.wh@gmail.com 2009-10-25 09:03:09 --- (In reply to comment #12)
Removing deprecated CVS/GIT version tag. Please retest in current git. If still present, update version field to earliest known version of wine that had this bug. Thanks!
Still present in 1.1.32.
http://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #14 from Bruno Jesus 00cpxxx@gmail.com 2011-09-04 15:12:25 CDT --- Created an attachment (id=36231) --> (http://bugs.winehq.org/attachment.cgi?id=36231) Compiled test
Still present in 1.3.27. Compiled test attached.
http://bugs.winehq.org/show_bug.cgi?id=9435
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |boreno@gmail.com
--- Comment #15 from Austin English austinenglish@gmail.com 2011-09-06 04:59:19 CDT --- *** Bug 24728 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=9435
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thuerrschmidt@gmail.com
--- Comment #16 from Jerome Leclanche adys.wh@gmail.com 2011-11-14 06:51:19 CST --- *** Bug 22164 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=9435
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #17 from Bruno Jesus 00cpxxx@gmail.com 2011-11-14 17:40:50 CST --- The following patch fixes this problem but I'm still working in a test case to prove the patch is right: http://bugs.winehq.org/attachment.cgi?id=37392
It's a simplified version of the original attachment 7826 from Peter Åstrand.
http://bugs.winehq.org/show_bug.cgi?id=9435
yt wine.hq@kamiza.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine.hq@kamiza.de
--- Comment #18 from yt wine.hq@kamiza.de 2013-02-07 00:34:17 CST --- Exact this behavior occur in Magix Music Maker 17 Premium with Wine 1.4
https://bugs.winehq.org/show_bug.cgi?id=9435
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #19 from super_man@post.com --- (In reply to Bruno Jesus from comment #17)
The following patch fixes this problem but I'm still working in a test case to prove the patch is right: http://bugs.winehq.org/attachment.cgi?id=37392
It's a simplified version of the original attachment 7826 [details] from Peter Åstrand.
patching file dlls/user32/mdi.c Hunk #1 succeeded at 1709 (offset 8 lines). Hunk #2 succeeded at 1719 (offset 8 lines). Hunk #3 succeeded at 1741 (offset 8 lines).
against 1.7.55
https://bugs.winehq.org/show_bug.cgi?id=9435
adimetrius@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adimetrius@gmail.com
--- Comment #20 from adimetrius@gmail.com --- This bug is almost 9 years old and known, there is a know fix, but the bug is still here as of 1.6! Can't believe it!
I fixed this bug on my old system back in 2008 when wine was 0.something, now rediscoverd it in 1.4 and 1.6.
How do i help this bug be fixed in the downloadable packaged next releases of wine?
Personally, I find the solution proposed in bug 22164 (which is marked as duplicate of 9435) better than in bug 9435.
https://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #21 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to adimetrius from comment #20)
Personally, I find the solution proposed in bug 22164 (which is marked as duplicate of 9435) better than in bug 9435.
The patch Bruno attached to the bug 22164 looks a lot simpler, yes. It still needs a test case though.
https://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #22 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Dmitry Timoshkov from comment #21)
The patch Bruno attached to the bug 22164 looks a lot simpler, yes. It still needs a test case though.
I was never able to produce a test, I tried but window api is not my strong point.
https://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #23 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Bruno Jesus from comment #22)
The patch Bruno attached to the bug 22164 looks a lot simpler, yes. It still needs a test case though.
I was never able to produce a test, I tried but window api is not my strong point.
I'll try to find some time and write a test case.
https://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #24 from Dmitry Timoshkov dmitry@baikal.ru --- https://www.winehq.org/pipermail/wine-patches/2015-November/144734.html https://www.winehq.org/pipermail/wine-patches/2015-November/144733.html https://www.winehq.org/pipermail/wine-patches/2015-November/144732.html
https://bugs.winehq.org/show_bug.cgi?id=9435
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |ecd814cca5e704e4ffdebd7609f | |a5593aed96393 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #25 from Dmitry Timoshkov dmitry@baikal.ru --- Should be fixed by ecd814cca5e704e4ffdebd7609fa5593aed96393, thanks Bruno :)
https://bugs.winehq.org/show_bug.cgi?id=9435
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |0.9.43.
https://bugs.winehq.org/show_bug.cgi?id=9435
--- Comment #26 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Dmitry Timoshkov from comment #25)
Should be fixed by ecd814cca5e704e4ffdebd7609fa5593aed96393, thanks Bruno :)
Thanks Dmitry for your effort, it is always good to see a forgotten patch being commited.
https://bugs.winehq.org/show_bug.cgi?id=9435
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #27 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.8-rc2.