[1/5] comctl32/listview: Don't offset item box to item position on LVS_EX_FULLROWSELECT if item isn't in leftmost column
Nikolay Sivov
bunglehead at gmail.com
Sun Jun 14 17:07:53 CDT 2009
Another patch for column reordering.
Changelog:
- Don't offset item box to item position on LVS_EX_FULLROWSELECT if
item isn't in leftmost column
>From e0e63a3016d7439836c347f903f4887d4093b5c2 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Sun, 14 Jun 2009 20:08:54 +0400
Subject: Don't offset item box to item position on LVS_EX_FULLROWSELECT if
item isn't in leftmost column
---
dlls/comctl32/listview.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 8ef516a..2599abd 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -2249,7 +2249,13 @@ static void LISTVIEW_GetItemBox(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT
}
LISTVIEW_GetItemMetrics(infoPtr, &lvItem, lprcBox, 0, 0, 0, 0);
- OffsetRect(lprcBox, Position.x + Origin.x, Position.y + Origin.y);
+ if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT &&
+ SendMessageW(infoPtr->hwndHeader, HDM_ORDERTOINDEX, 0, 0))
+ {
+ OffsetRect(lprcBox, Origin.x, Position.y + Origin.y);
+ }
+ else
+ OffsetRect(lprcBox, Position.x + Origin.x, Position.y + Origin.y);
}
--
1.5.6.5
More information about the wine-patches
mailing list