[1/2] comctl32/listview: Partially revert commit 43d982fde6b363199c95037935e0f5446df8f733

Nikolay Sivov bunglehead at gmail.com
Fri Jun 5 05:05:39 CDT 2009


This commit caused a crash in a demo for bug http://bugs.winehq.org/show_bug.cgi?id=18647
More tests needed.

Changelog:
    - Partially revert commit 43d982fde6b363199c95037935e0f5446df8f733

>From 1aa95bc55ec829566ba325a712075a0093dace8e Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Fri, 5 Jun 2009 13:53:28 +0400
Subject: Partially revert commit 43d982fde6b363199c95037935e0f5446df8f733

---
 dlls/comctl32/listview.c       |    2 --
 dlls/comctl32/tests/listview.c |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index b50bf2b..56b244d 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -5058,8 +5058,6 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW)
 
     if (~infoPtr->dwStyle & LVS_EDITLABELS) return 0;
     if (nItem < 0 || nItem >= infoPtr->nItemCount) return 0;
-    /* Edit could be created only on focused control and if isn't already created */
-    if (GetFocus() != infoPtr->hwndSelf && !IsWindow(infoPtr->hwndEdit)) return 0;
 
     infoPtr->nEditLabelItem = nItem;
 
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index a8e0b9b..fae24e2 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -2919,7 +2919,7 @@ static void test_editbox(void)
     /* creating label disabled when control isn't focused */
     SetFocus(0);
     hwndedit = (HWND)SendMessage(hwnd, LVM_EDITLABEL, 0, 0);
-    ok(hwndedit == NULL, "Expected Edit window not to be created\n");
+    todo_wine ok(hwndedit == NULL, "Expected Edit window not to be created\n");
 
     /* check EN_KILLFOCUS handling */
     memset(&item, 0, sizeof(item));
-- 
1.5.6.5







More information about the wine-patches mailing list