http://bugs.winehq.org/show_bug.cgi?id=12553
Summary: Toolbars misplaced, hidden Product: Wine Version: 0.9.59. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: tarasov.igor@gmail.com
Created an attachment (id=12122) --> (http://bugs.winehq.org/attachment.cgi?id=12122) WINEDEBUG=+toolbar,+listview,+themingcombo wine 0.9.59 log
Here are two screenshots:
Wine being run with MS comctl32.dll, the same thing you see in Windows: http://polosatus.ru/wine/toolbar_reference.png
And wine running with it's own version of comctl32: http://polosatus.ru/wine/toolbar_bug.png
First of all, disappeared toolbar at the middle of screenshot.
Also, notice misplaced right toolbar. It is misplaced to left a bit. I suppose both bugs are related.
Seems that developers have used some undocumented features, as log has this:
warn:toolbar:TOOLBAR_SetBitmapSize 5 buttons, undoc increase to bitmap size : 16-15 -> 20-20
and this:
warn:toolbar:TOOLBAR_SetBitmapSize 6 buttons, undoc increase to bitmap size : 20-20 -> 16-16
several times.
I've supposed that WINEDEBUG=+toolbar,+listview,+themingcombo should be enough for initial log :)
http://bugs.winehq.org/show_bug.cgi?id=12553
Igor Tarasov tarasov.igor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |comctl32
http://bugs.winehq.org/show_bug.cgi?id=12553
Igor Tarasov tarasov.igor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Igor Tarasov tarasov.igor@gmail.com 2008-04-14 07:09:50 --- *** This bug has been confirmed by popular vote. ***
http://bugs.winehq.org/show_bug.cgi?id=12553
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal
--- Comment #2 from Lei Zhang thestig@google.com 2008-04-14 15:38:46 --- This is with the watchtower program right? What version?
Voting on your own bugs to get bugzilla to confirm it, is... manipulating the system.
Severity is not major, please read the descriptions more carefully.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #3 from Igor Tarasov tarasov.igor@gmail.com 2008-04-15 02:41:53 --- Sorry, there was no information about bugs severety on bug filing page. I was supposed to click the Severety link. My fault
Also, I didn't know that shouldn't vote for own bug. But I have to admit, that another bug was filed almost at the same time as I did (bug #12542), and it deals with exactly the same problem. Also, that bug has 2 votes, and the author of that bug did not vote. So, we have at least 3 persons who confirm this buggy behavior, and I suppose its pretty fair that both of these bugs are confirmed.
Yes, the programm is Watchtower Reader, all versions (that is 2005-2007).
Do you need some more debugging/testing?
BTW, when I change the left pane width (see the screenshot), buttons appear for a moment and then disappear again. And similar behavior is found with top buttons, when toolbar gets redrawn it initially appears at the correct position just for a moment, and then moves 2 px down.
But the frame around text input is partly covered by something constantly (as you may see it on screenshot), it does not flicker.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #4 from Igor Tarasov tarasov.igor@gmail.com 2008-04-20 14:50:06 --- Okay, I've made alot of debugging and research (as much as my knowledge of it allows) and was not able to figure out what's the problem is.
But now I am pretty sure that images resizing has nothing to do with it. At leas I was not able to find any connections.
Any directions how can I help you resolve this bug are welcome.
P.S: Is there a way to join this bug with bug #12542? I'm not too sure how to do this, I mean would marking bug as duplicate remove it?
http://bugs.winehq.org/show_bug.cgi?id=12553
Dripple dripple2@laposte.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dripple2@laposte.net
http://bugs.winehq.org/show_bug.cgi?id=12553
Maciej maciej.trebacz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maciej.trebacz@gmail.com
--- Comment #5 from Maciej maciej.trebacz@gmail.com 2008-05-28 06:11:10 --- Any news on this problem? Is there any way I can help resolve it? This is really one of the last glitches in WTLib and I would love to help getting it fixed.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #6 from Maciej maciej.trebacz@gmail.com 2008-05-28 06:13:15 --- *** Bug 12542 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #7 from Igor Tarasov tarasov.igor@gmail.com 2008-05-29 11:30:34 --- Created an attachment (id=13463) --> (http://bugs.winehq.org/attachment.cgi?id=13463) WINEDEBUG=+toolbar,+rebar wine-1.0.0-rc2 log
Umm...
I've just found out that it kinda related not to toolbar, but rather to rebar, or even something else, since entire rebar that holds toolbar disappears.
The problem is that I can't do +message debug run, since the application just won't launch.
The attached file is +toolbar,+rebar log. There are three rebars, the second of them (look for "# 1") holds the toolbar that disappears (0x1005a). It appears and disappears several times (as I change left pane's size, it appears for a moment and then disappears again), for instance, it disappears somewhere at 8300, but I am not sure where exactly, but not on: - TOOLBAR_Size - TOOLBAR_AutoSize - REBAR_MoveChildWindows
Another theory is that another window element just somehow covers our rebar, but I just don't know how to check that out, how to inspect the UI.
http://bugs.winehq.org/show_bug.cgi?id=12553
Holger Patzelt hop2005@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hop2005@gmx.de
http://bugs.winehq.org/show_bug.cgi?id=12553
Holger Patzelt hop2005@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|hop2005@gmx.de |
http://bugs.winehq.org/show_bug.cgi?id=12553
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #8 from Dan Kegel dank@kegel.com 2008-06-26 09:05:30 --- It sure would be easier if this app could be downloaded.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #9 from Dripple dripple2@laposte.net 2008-06-26 09:45:34 --- As it is not, what else could help you ?
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #10 from Dripple dripple2@laposte.net 2008-06-26 09:46:02 --- As it is not, what else could help you ?
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #11 from Igor Tarasov tarasov.igor@gmail.com 2008-06-27 16:23:48 --- I've noticed, that rebar, listview and treeview are among least implmented, but widely used common controls. http://www.winehq.org/site/status_ui
This leads to bugs and small glitches (about 1/3 of all reported comctl32 bugs).
http://bugs.winehq.org/show_bug.cgi?id=12553
Gareth Buxton gareth.buxton@googlemail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gareth.buxton@googlemail.com
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #12 from Austin English austinenglish@gmail.com 2008-12-29 10:54:57 --- Is this still an issue in current (1.1.11 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #13 from Dan Kegel dank@kegel.com 2008-12-29 11:04:33 --- dripple, if somebody could send us a copy, that would help.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #14 from Igor Tarasov tarasov.igor@gmail.com 2008-12-29 11:57:30 --- Yes, the problem still exist in 1.1.11.
License agreement does not allow us to do so, but I'll try to contact the developers and see how they can help. Meanwhile, I have exchanged a couple of emails with one wine developer, Mikołaj Zalewski. Here is what he said about this bug:
This looks like a rebar layout problem. I have already fixed some layout problems and know this code well so I could try to check what is wrong. What you could check is if minimizing/maximizing the window would change anything - there are some redraw problems that are not fixed (it looked to me that they even are in user32, not comctl32). If it changes, attach the screenshot of the window after this operation.
So, I've answered:
Well, it's not that noticeable when you minimize/maximize window, but it's much more noticable when you resize the left bar.
http://www.polosatus.ru/wine/wtlibcalm.png displays program interface when it is loaded. You may see empty space at the left bar - there is missing toolbar. Another problem is partly misplaced left toolbar (it is a bit left and down from its original position). You may compare it with reference rendering from bug description (it uses different program version, but bug is the same):
http://www.polosatus.ru/wine/toolbar_reference.png http://www.polosatus.ru/wine/toolbar_bug.png
Now, when you change bar width, toolbar flickers a bit. The first thing that flickers there (not always noticeable) is the top input field and search button. Hardly, but I've caught it for a screenshot, see http://www.polosatus.ru/wine/wtlibflicker1.png (i've made right bar a bit wider and it redraws).
Then, it disappears, and you can see the missing toolbar ( http://www.polosatus.ru/wine/wtlibflicker2.png ) and then it disappears and interface returns to http://www.polosatus.ru/wine/wtlibcalm.png
But Mikołaj never responded.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #15 from Igor Tarasov tarasov.igor@gmail.com 2009-02-25 17:32:41 --- Well, I've finally found some neat tool to do visual debug (Winspector) and quickly found out that the problem is in rebars. Both misplaced windows are rebars (all other elements sit there pixel-perfect). Somehow I've decieded to remove CCS_NOMOVEY style from both of them, moved the divider (so that all interface could get redrawn), and voila! it all works! No more hidden/misplaced toolbars.
Generally this means that it is somewhere pretty close, but I am not yet sure where exactly.
I thought that this flag could get set up in error, but Winspector showed that CCS_NOMOVEY is there with native comctl32.dll.
And here I need some help: I can't find any information regarding CCS_NOMOVEY on MSDN and I am stuck here.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #16 from Igor Tarasov tarasov.igor@gmail.com 2009-02-25 20:03:05 --- Well, the trick was not in CCS_NOMOVEY. It was in updating styles.
When the application starts it sets styles:
trace:rebar:REBAR_WindowProc hwnd=0x1006e msg=7d wparam=fffffff0 lparam=32e3d8 trace:rebar:REBAR_StyleChanged current style=5600064e, styleOld=4600064e, style being set to=5600064e
Which is correct. But then, it does the following:
trace:rebar:REBAR_WindowProc hwnd=0x1006e msg=7d wparam=ffffffec lparam=32f09c trace:rebar:REBAR_StyleChanged current style=5600064e, styleOld=00000000, style being set to=00010000
And for the other rebar too:
trace:rebar:REBAR_WindowProc hwnd=0x100d0 msg=7d wparam=fffffff0 lparam=32e2d0 trace:rebar:REBAR_StyleChanged current style=5600064e, styleOld=4600064e, style being set to=5600064e
...
trace:rebar:REBAR_WindowProc hwnd=0x100d0 msg=7d wparam=ffffffec lparam=32ef94 trace:rebar:REBAR_StyleChanged current style=5600064e, styleOld=00000000, style being set to=00000000
This resets all flags, including CCS_NORESIZE, and REBAR_ForceResize starts resizing rebars, while it should not.
Well, somehow Winspector shows correct styles, which is odd, since REBAR_StyleChanged does rewrite both dwStyle and orgStyle. And after I update the styles via Winspector, as I said rebars behave well.
Native comctl32.dll seems to avoid this somehow.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #17 from Dmitry Timoshkov dmitry@codeweavers.com 2009-02-25 22:39:14 --- (In reply to comment #16)
Well, somehow Winspector shows correct styles, which is odd, since REBAR_StyleChanged does rewrite both dwStyle and orgStyle. And after I update the styles via Winspector, as I said rebars behave well. Native comctl32.dll seems to avoid this somehow.
That means that REBAR_StyleChanged handler should be removed, and an original style (the window was created with) should be used.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #18 from Dmitry Timoshkov dmitry@codeweavers.com 2009-02-25 22:57:14 --- (In reply to comment #17)
That means that REBAR_StyleChanged handler should be removed, and an original style (the window was created with) should be used.
Although a test case is required to see what happens in reality.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #19 from Igor Tarasov tarasov.igor@gmail.com 2009-02-26 11:45:46 --- Created an attachment (id=19674) --> (http://bugs.winehq.org/attachment.cgi?id=19674) Fix REBAR_StyleChanged
So, MSDN states that WM_STYLECHANGED needs 2 params: wParam, which specifies whether the window's styles or extended window styles have changed, and lParam, holding styles. But REBAR_StyleChanged operates only with lParam. http://msdn.microsoft.com/en-us/library/ms632648(VS.85).aspx
So, I've added wParam check (see attached file) and now everything works. But there are 2 problems:
1. There are no dwExStyle property in REBAR_INFO structure. Also, I can't find any usage of these styles in rebar.c. Is that okay? I've just put a FIXME for case when EXSTYLE is updated (BTW, toolbar control also does not update exstyles on WM_STYLECHANGED).
2. While Rebars now are at their places, child toolbars are not there exactly:
2.1. Firstly, top toolbar is of wrong height. Client height of top rebar is 28 px. But toolbar is only 26 px high. Native comctl32.dll makes 27px high toolbar. Side-by-side comparison (combined image - all buttons hovered): http://www.polosatus.ru/wine/toptoolbar.sidebyside.png On this image you can clearly see that builtin comctl buttons are narrower than native and there is some glitch with bottom line - dark rebar frame is only 29 px high somehow.
2.2. Left toolbar is a bit broken: there is a text input that displays page/chapter number and there are also up/down buttons. Image (combined, all buttons hovered): http://www.polosatus.ru/wine/lefttoolbar.sidebyside.png The problems are: 2.2.1. Up button is placed behind the text input. It is still clicable and still works, but it is clearly misplaced. 2.2.2. All buttons on that panel are not square. Their height is bigger than width. 2.2.3. Bitmaps on these buttons are misplaced. All of them are not centered, but moved a bit to right.
At the moment I do not create new bug, since I think that these problems are related.
http://bugs.winehq.org/show_bug.cgi?id=12553
Igor Tarasov tarasov.igor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #13463|0 |1 is obsolete| |
--- Comment #20 from Igor Tarasov tarasov.igor@gmail.com 2009-02-26 12:00:38 --- Created an attachment (id=19676) --> (http://bugs.winehq.org/attachment.cgi?id=19676) +toolbar,+rebar log on wine from git (~1.1.16) with above patch
Updated logs
http://bugs.winehq.org/show_bug.cgi?id=12553
Igor Tarasov tarasov.igor@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #19674|0 |1 is obsolete| |
--- Comment #21 from Igor Tarasov tarasov.igor@gmail.com 2009-02-26 12:05:25 --- Created an attachment (id=19677) --> (http://bugs.winehq.org/attachment.cgi?id=19677) Fix REBAR_StyleChanged
Added newline to FIXME.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #22 from Igor Tarasov tarasov.igor@gmail.com 2009-04-19 10:01:40 --- Created an attachment (id=20552) --> (http://bugs.winehq.org/attachment.cgi?id=20552) Fix button height
This patch fixes button height and partly width problems. The problem was that TOOLBAR_SetImageList did toolbar recalculation even when it was not necessary, thus rewriting pre-defined button sizes.
To see this bug with control spy (v1 used) do this:
1. Change styles, add "TBBSTYLE_LIST" style. 2. Change ButtonSize (TB_SETBUTTONSIZE) to, say, 30,30. 3. Send TB_AUTOSIZE. 4. Send TB_SETIMAGELIST.
You'll see that button sizes have changed, even though imagelist was actually the same. With native comctl, button sizes would stay unchanged.
So, this patch checks if current toolbar's bitmap sizes differ from new imagelist ones, and would recalculate toolbar and change button sizes only if these have really changed.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #23 from Igor Tarasov tarasov.igor@gmail.com 2009-04-23 18:25:18 --- So, some things have been fixed lately, this is what left unfixed:
(In reply to comment #19)
http://www.polosatus.ru/wine/toptoolbar.sidebyside.png On this image you can clearly see that builtin comctl buttons are narrower than native
http://www.polosatus.ru/wine/lefttoolbar.sidebyside.png 2.2.2. All buttons on that panel are not square. Their height is bigger than width. 2.2.3. Bitmaps on these buttons are misplaced. All of them are not centered, but moved a bit to right.
Re: 2.2.3 bitmaps are not misplaced, the entire problem is in too narrow buttons. Which happens (as I suppose for now) because the program changes button bitmap size twice: from 16x15 to 20x20 and then to 16x16, but before the last change it sends TB_SETIMAGELIST, and then behavor somehow changes - it does no longer react to TB_SETBITMAPSIZE. Pretty weird.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #24 from Austin English austinenglish@gmail.com 2009-10-29 15:25:32 --- Is this still an issue in current (1.1.32 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #25 from Igor Tarasov tarasov.igor@gmail.com 2009-10-29 18:39:54 --- Everything from comment #23 is still here.
The entire problem is in wrong handling of button bitmap sizes. I've been trying to write a test that would illustrate that, but I couldn't:
http://www.mail-archive.com/wine-devel@winehq.org/msg54293.html
http://bugs.winehq.org/show_bug.cgi?id=12553
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bunglehead@gmail.com
--- Comment #26 from Austin English austinenglish@gmail.com 2009-10-29 20:36:02 --- (In reply to comment #25)
Everything from comment #23 is still here.
The entire problem is in wrong handling of button bitmap sizes. I've been trying to write a test that would illustrate that, but I couldn't:
http://www.mail-archive.com/wine-devel@winehq.org/msg54293.html
Perhaps Nikolay has an idea?
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #27 from Nikolay Sivov bunglehead@gmail.com 2009-10-30 23:34:42 --- (In reply to comment #26)
Perhaps Nikolay has an idea?
Maybe you're right, but I'm away for a couple of weeks (counting from today), no development box, so you shouldn't expect anything from me for this time, unfortunately. I will certainly take a look when come back.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #28 from Austin English austinenglish@gmail.com 2010-04-30 17:11:13 --- This is your friendly reminder that there has been no bug activity for 6 months. Is this still an issue in current (1.1.43 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #29 from Igor Tarasov tarasov.igor@gmail.com 2010-05-01 01:27:53 --- See comment #25, nothing in toolbar code changed since then.
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #30 from Austin English austinenglish@gmail.com 2012-03-19 14:53:20 CDT --- This is your friendly reminder that there has been no bug activity for 650 days. Is this still an issue in current (1.4 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #31 from Igor Tarasov tarasov.igor@gmail.com 2012-03-19 16:05:31 CDT --- Still an issue. See comment #29. ;)
http://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #32 from Austin English austinenglish@gmail.com 2012-03-19 17:29:48 CDT --- (In reply to comment #31)
Still an issue. See comment #29. ;)
Yeah, I glanced at the code, but figured the ping would remind Nikolay, since his vacation seems to wiped his memory ;).
https://bugs.winehq.org/show_bug.cgi?id=12553
--- Comment #33 from Austin English austinenglish@gmail.com --- No change in 1.7.16.
https://bugs.winehq.org/show_bug.cgi?id=12553
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|bunglehead@gmail.com |
https://bugs.winehq.org/show_bug.cgi?id=12553
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #34 from super_man@post.com --- Could someone change the title to match the bug report?
"Yes, the programm is Watchtower Reader, all versions (that is 2005-2007)."
https://bugs.winehq.org/show_bug.cgi?id=12553
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Toolbars misplaced, hidden |Watchtower Reader: Toolbars | |misplaced, hidden
https://bugs.winehq.org/show_bug.cgi?id=12553
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Watchtower Reader: Toolbars |Watchtower Reader |misplaced, hidden |(2005-2007): Toolbars | |misplaced, hidden