listbox: scrolling corruption fix
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Tue Mar 16 07:49:58 CST 2004
Huw Davies <huw at codeweavers.com>
Invalidate the focused item when scrolling horizontally so
that it repaints correctly.
--
Huw Davies
huw at codeweavers.com
Index: controls/listbox.c
===================================================================
RCS file: /home/wine/wine/controls/listbox.c,v
retrieving revision 1.99
diff -u -r1.99 listbox.c
--- controls/listbox.c 10 Dec 2003 04:14:35 -0000 1.99
+++ controls/listbox.c 16 Mar 2004 13:48:57 -0000
@@ -1210,8 +1210,14 @@
descr->horz_pos = pos;
LISTBOX_UpdateScroll( hwnd, descr );
if (abs(diff) < descr->width)
+ {
+ RECT rect;
+ /* Invalidate the focused item so it will be repainted correctly */
+ if (LISTBOX_GetItemRect( descr, descr->focus_item, &rect ) == 1)
+ InvalidateRect( hwnd, &rect, TRUE );
ScrollWindowEx( hwnd, diff, 0, NULL, NULL, 0, NULL,
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN );
+ }
else
InvalidateRect( hwnd, NULL, TRUE );
}
More information about the wine-patches
mailing list