http://bugs.winehq.org/show_bug.cgi?id=7280
------- Additional Comments From fpga@pacbell.net 2007-04-02 18:06 ------- Created an attachment (id=4785) --> (http://bugs.winehq.org/attachment.cgi?id=4785&action=view) A test of treeview focus.
Here is a very small test, including source and executable. The source is virtually a direct copy of the Wine treeview test, with an additional test added and minor supporting mods to the existing code.It is compiled on Win2K with mingw. Unfortunately, it does not seem to give valid results when actually used as a Wine conformance test. Either focus events don't work under the conformance test structure (perhaps because the Window is not actually mapped, and therefore does not have focus), or I am doing something wrong ( rather likely ;)
However, the attached test actually creates a visible window, so the test works that way. When run on Win2K, it shows that if a label is being edited, a (programmatic) scroll of the window does not remove the focus from the edit field. But clicking on one of the scrollbars with the left mouse button does remove the focus. When run under Wine, the (programmatic) scroll does remove the focus from the edit field.
So it appears Wine should not do a SetFocus() in the scroll procedures, but instead in response to perhaps a WM_NCLBUTTONDOWN message.