[2/2] comctl32/listview: Don't draw wrapped focus rectangle
Nikolay Sivov
bunglehead at gmail.com
Wed Apr 29 15:12:57 CDT 2009
I'm trying to fix some glitches and other visiual inconsistenses (there's a lot).
Speaking on report mode now. Resizing leftmost column (without fuill row selection set)
you'll get wrapped focus rectangle when right focus border comes over left one.
Changelog:
- Don't draw wrapped focus rectangle
>From 364241b066390c672924c37075b617af88bb0b7b Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Wed, 29 Apr 2009 23:04:56 +0400
Subject: Don't draw wrapped focus rectangle
---
dlls/comctl32/listview.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 901893f..bfe47a3 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -1412,6 +1412,13 @@ static inline BOOL LISTVIEW_GetItemW(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpL
return LISTVIEW_GetItemT(infoPtr, lpLVItem, TRUE);
}
+/* used to handle collapse main item column case */
+static inline BOOL LISTVIEW_DrawFocusRect(const LISTVIEW_INFO *infoPtr, HDC hdc)
+{
+ return (infoPtr->rcFocus.left < infoPtr->rcFocus.right) ?
+ DrawFocusRect(hdc, &infoPtr->rcFocus) : FALSE;
+}
+
/* Listview invalidation functions: use _only_ these functions to invalidate */
static inline BOOL is_redrawing(const LISTVIEW_INFO *infoPtr)
@@ -1862,7 +1869,7 @@ static void LISTVIEW_ShowFocusRect(const LISTVIEW_INFO *infoPtr, BOOL fShow)
}
else
{
- DrawFocusRect(hdc, &infoPtr->rcFocus);
+ LISTVIEW_DrawFocusRect(infoPtr, hdc);
}
done:
ReleaseDC(infoPtr->hwndSelf, hdc);
@@ -4368,7 +4375,7 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra
/* if we have a focus rect, draw it */
if (infoPtr->bFocus)
- DrawFocusRect(hdc, &infoPtr->rcFocus);
+ LISTVIEW_DrawFocusRect(infoPtr, hdc);
}
iterator_destroy(&i);
--
1.5.6.5
More information about the wine-patches
mailing list