[4/5] comctl32/listview: Don't redraw focus rectangle on column scroll

Nikolay Sivov bunglehead at gmail.com
Mon May 11 03:01:16 CDT 2009


This fixes focus frame redrawing on column resizing.
It seems that native redraws it one time on starting resising and
only scrolls after that results in broken frame sometimes.

Now you won't see garbadge around rightmost column boundary.

Changelog:
    - Don't redraw focus rectangle on column scroll

>From f13f6c9e1f1ce2ec329ebe25ee1d96b5c18720ca Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Sun, 10 May 2009 13:15:44 +0400
Subject: Don't redraw focus rectangle on column scroll

---
 dlls/comctl32/listview.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 7bed09e..f268855 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -4658,9 +4658,6 @@ static void LISTVIEW_ScrollColumns(LISTVIEW_INFO *infoPtr, INT nColumn, INT dx)
     /* do not update screen if not in report mode */
     if (!is_redrawing(infoPtr) || (infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return;
     
-    /* if we have a focus, we must first erase the focus rect */
-    if (infoPtr->bFocus) LISTVIEW_ShowFocusRect(infoPtr, FALSE);
-    
     /* Need to reset the item width when inserting a new column */
     infoPtr->nItemWidth += dx;
 
@@ -4671,9 +4668,6 @@ static void LISTVIEW_ScrollColumns(LISTVIEW_INFO *infoPtr, INT nColumn, INT dx)
     rcOld = infoPtr->rcList;
     rcOld.left = ptOrigin.x + rcCol.left + dx;
     ScrollWindowEx(infoPtr->hwndSelf, dx, 0, &rcOld, &rcOld, 0, 0, SW_ERASE | SW_INVALIDATE);
-    
-    /* we can restore focus now */
-    if (infoPtr->bFocus) LISTVIEW_ShowFocusRect(infoPtr, TRUE);
 }
 
 /***
-- 
1.5.6.5





More information about the wine-patches mailing list