Comctl32's tabs fix

José Manuel Ferrer Ortiz jmfo1982 at yahoo.es
Wed Nov 5 07:12:16 CST 2003


Hi, I found a problem with tabs with many items that
needed scrolling (like in the initial screen of
WinUAE, which is freely available at
http://www.winuae.net ): when you scroll the tabs to
the left (for example, when item 4 is the leftmost
visible item in the tab control), and then click on
one of the visible items, that item is never selected,
instead is always selected item 0, despite of the
position (in the tab control) where you've clicked.

I begin to examine the code, and found the problem in
the function TAB_LButtonDown. It seems that if it
executes
 TAB_RelayEvent (infoPtr->hwndToolTip, hwnd,
		    WM_LBUTTONDOWN, wParam, lParam);
before the TAB_InternalHitTest call is made, this last
function always returns 0, despite of where have you
clicked on.

My patch moves that call and the setting of the pt
variable before the first try (it's under two
different if) of the execution of TAB_RelayEvent, that
is immediately after variable declaration of the
function (TAB_LButtonDown).

Maybe it's not the best way to solve the problem, but
at least with my patch it works well. The right
solution should be finding and solving the named
conflict between TAB_RelayEvent and
TAB_InternalHitTest, but I've been unable to find it.

Regards,
José Manuel

___________________________________________________
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parche_tab_comctl32.diff
Type: application/octet-stream
Size: 721 bytes
Desc: parche_tab_comctl32.diff
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20031105/e94ad20b/parche_tab_comctl32.obj


More information about the wine-patches mailing list