mike at theoretic.com
Tue Feb 24 06:43:25 CST 2004
Here's an easy to fix bug for somebody wanting to get into Wine hacking,
or who has a spare few minutes.
The basic problem is with the tab control and can be seen by running
... that (from control spy).
As you can see on the bottom row, the top of the tabs are overdrawn by the
row above. Putting a Sleep call into the tab drawing code reveals that
we're not drawing the tabs in any particular order (presumably it's the
order they were added) and reading the code indicates that having
TAB_DrawItem overdraw its bottom is the expected behaviour.
The code can be seen in dlls/comctl32/tab.c, in TAB_Refresh and
One fix is to draw the tabs from top row to the bottom,
instead of in a random order. In order to do that, you need to read the
code in TAB_SetItemBounds and add a new field to TAB_ITEM to record which
row it was placed in. Then, in TAB_Refresh, firstly sort the TAB_ITEMS
topmost to bottommost before drawing them.
This shouldn't be too hard, but would fix a nasty visual glitch in Wine.
If anybody feels like doing it but gets stuck feel free to ask here for
help. On the other hand if you're an old hand at Wine feel free to fix it
too, there's little point keeping bugs around for training purposes :)
More information about the wine-devel