[3/3] comctl32/listview: Fix hittest flag calculation for negative Y values on report mode
Nikolay Sivov
bunglehead at gmail.com
Mon Jul 6 18:52:42 CDT 2009
Changelog:
- Fix hittest flag calculation for negative Y values on report mode
>From 6ef092fe55c3dbefe345a257ca3fd34425eab250 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Tue, 7 Jul 2009 03:44:30 +0400
Subject: Fix hittest flag calculation for negative Y values on report mode
---
dlls/comctl32/listview.c | 4 +---
dlls/comctl32/tests/listview.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 24da77d..cd1d0d5 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -6820,9 +6820,7 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht,
else
opt.y = lpht->pt.y;
- if (infoPtr->rcList.top > opt.y)
- lpht->flags |= LVHT_ABOVE;
- else if (infoPtr->rcList.bottom < opt.y)
+ if (infoPtr->rcList.bottom < opt.y)
lpht->flags |= LVHT_BELOW;
}
else
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index fd0e55c..c0b272b 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -2675,7 +2675,7 @@ static void test_hittest(void)
/* subitem returned with -1 item too */
x = pos.x + 150;
y = -10;
- test_lvm_subitemhittest(hwnd, x, y, -1, 1, LVHT_NOWHERE, FALSE, FALSE, TRUE, __LINE__);
+ test_lvm_subitemhittest(hwnd, x, y, -1, 1, LVHT_NOWHERE, FALSE, FALSE, FALSE, __LINE__);
/* parent client area is 100x100 by default */
MoveWindow(hwnd, 0, 0, 300, 100, FALSE);
x = pos.x + 150; /* outside column */
--
1.5.6.5
More information about the wine-patches
mailing list