Use WM_PAINT to redraw button instead of directly calling unthemed paint routine
thunderbird2k at gmail.com
Tue Aug 14 21:27:38 CDT 2012
On Tue, Aug 14, 2012 at 6:28 PM, Dmitry Timoshkov <dmitry at baikal.ru> wrote:
> Ruslan Kabatsayev <b7.10110111 at gmail.com> wrote:
>> This patch makes buttons render correctly themed in various cases when
>> e.g. they are pressed and released, made active etc. Without this
>> patch they look win95-like in such cases even if desktop integration
>> is used.
> Let me guess, you didn't run 'make test' with these changes?
The way theming is currently implemented in Wine is incorrect. Let me
explain and for more details go through wine-devel archives.
Currently we subclass relevant controls within comctl32 in order to
theming. This allowed us to share the core implementation (which is in
user32) between theming and non-theming. As you noticed there are
drawing issues. Patches like the one you submitted 'fix' drawing
issues, but they will applications because they generate events which
don't happen on win32 for themed and non-themed buttons. There is no
way to make these tests pass in the current architecture.
What we have to do is it do what Microsoft did for theming. For
comctl32 v6 they duplicated every control in comctl32 (before they
were in user32). Each of the new implementations can do theming
itself. This is quite a bit of work. The main thing which we have to
think of is how to deal with our unit tests. We have thousands of
tests for controls which are currently in user32 and which may have to
be duplicated unless there is another solution.
Bottom line is that it's best to forget about the current theming code
in Wine. We have to figure out how to move forward with theming.
More information about the wine-devel