[2/2] comctl32/header: Update item bounds on WM_SIZE

Nikolay Sivov bunglehead at gmail.com
Sun Jul 12 05:20:31 CDT 2009


Bounds recalculation optimization is a next step,
tests show that bounds should be updated (on hittesting too).

Changelog:
    - Update item bounds on WM_SIZE

>From 8e5545df9c59747dc78020c4c394184feff33342 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Sun, 12 Jul 2009 04:40:58 +0400
Subject: Update item bounds on WM_SIZE

---
 dlls/comctl32/header.c       |    3 +--
 dlls/comctl32/tests/header.c |   32 ++++++++++----------------------
 2 files changed, 11 insertions(+), 24 deletions(-)

diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index aa68102..1ee58cd 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -247,8 +247,7 @@ HEADER_SetItemBounds (HEADER_INFO *infoPtr)
 static LRESULT
 HEADER_Size (HEADER_INFO *infoPtr)
 {
-    infoPtr->bRectsValid = FALSE;
-
+    HEADER_SetItemBounds(infoPtr);
     return 0;
 }
 
diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c
index 3b6aa30..bf3960e 100644
--- a/dlls/comctl32/tests/header.c
+++ b/dlls/comctl32/tests/header.c
@@ -819,10 +819,8 @@ static void test_hdm_getitemrect(HWND hParent)
     expect(80, rect.left);
     expect(0, rect.top);
     expect(160, rect.right);
-    todo_wine
-    {
-      expect(g_customheight, rect.bottom);
-    }
+    expect(g_customheight, rect.bottom);
+
     retVal = SendMessage(hChild, HDM_GETITEMRECT, 0, (LPARAM) &rect);
 
     ok(retVal == TRUE, "Getting item rect should TRUE, got %d\n", retVal);
@@ -831,10 +829,8 @@ static void test_hdm_getitemrect(HWND hParent)
     expect(0, rect.top);
 
     expect(80, rect.right);
-    todo_wine
-    {
-      expect(g_customheight, rect.bottom);
-    }
+    expect(g_customheight, rect.bottom);
+
     retVal = SendMessage(hChild, HDM_GETITEMRECT, 10, (LPARAM) &rect);
     ok(retVal == 0, "Getting rect of nonexistent item should return 0, got %d\n", retVal);
 
@@ -906,20 +902,14 @@ static void test_hdm_hittest(HWND hParent)
 
     flush_sequences(sequences, NUM_MSG_SEQUENCES);
     retVal = SendMessage(hChild, HDM_HITTEST, 0, (LPARAM) &hdHitTestInfo);
-    todo_wine
-    {
-      expect(0, retVal);
-      expect(0, hdHitTestInfo.iItem);
-    }
+    expect(0, retVal);
+    expect(0, hdHitTestInfo.iItem);
 
     pt.x = secondItemRightBoundary - 1;
     pt.y = bottomBoundary - 1;
     hdHitTestInfo.pt = pt;
     retVal = SendMessage(hChild, HDM_HITTEST, 1, (LPARAM) &hdHitTestInfo);
-    todo_wine
-    {
-      expect(1, retVal);
-    }
+    expect(1, retVal);
     expect(1, hdHitTestInfo.iItem);
 
     pt.x = secondItemRightBoundary;
@@ -950,11 +940,9 @@ static void test_hdm_sethotdivider(HWND hParent)
                                     "adder header control to parent", FALSE);
 
     flush_sequences(sequences, NUM_MSG_SEQUENCES);
-    todo_wine
-    {
-        retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, TRUE, MAKELPARAM(5, 5));
-        expect(0, retVal);
-    }
+    retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, TRUE, MAKELPARAM(5, 5));
+    expect(0, retVal);
+
     retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, FALSE, 100);
     expect(100, retVal);
     retVal = SendMessage(hChild, HDM_SETHOTDIVIDER, FALSE, 1);
-- 
1.5.6.5





More information about the wine-patches mailing list