Dylan Smith : comctl32: Fix for ComboBoxEx bug caused by focus change.

Alexandre Julliard julliard at winehq.org
Fri Jul 4 13:59:17 CDT 2008


Module: wine
Branch: master
Commit: 798afcf902071d14a71e3855e3a6b3732d778019
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=798afcf902071d14a71e3855e3a6b3732d778019

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Thu Jul  3 11:37:14 2008 -0400

comctl32: Fix for ComboBoxEx bug caused by focus change.

---

 dlls/comctl32/comboex.c       |    3 +++
 dlls/comctl32/tests/comboex.c |   12 ++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index 664d0a2..afd4f82 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -1267,6 +1267,9 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lPa
 	InvalidateRect (infoPtr->hwndCombo, 0, 0);
 	return 0;
 
+    case CBN_SETFOCUS:
+        return SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
+
     default:
 	/*
 	 * We have to change the handle since we are the control
diff --git a/dlls/comctl32/tests/comboex.c b/dlls/comctl32/tests/comboex.c
index dbd9c6e..eca7ca4 100644
--- a/dlls/comctl32/tests/comboex.c
+++ b/dlls/comctl32/tests/comboex.c
@@ -221,7 +221,7 @@ static void test_WM_LBUTTONDOWN(void)
     result = SendMessage(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
     ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n",
        GetLastError());
-    todo_wine ok(GetFocus() == hCombo,
+    ok(GetFocus() == hCombo,
        "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
        GetFocus());
     ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0),
@@ -232,7 +232,7 @@ static void test_WM_LBUTTONDOWN(void)
     result = SendMessage(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
     ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n",
        GetLastError());
-    todo_wine ok(GetFocus() == hCombo,
+    ok(GetFocus() == hCombo,
        "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
        GetFocus());
 
@@ -244,23 +244,23 @@ static void test_WM_LBUTTONDOWN(void)
     result = SendMessage(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y));
     ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n",
        GetLastError());
-    todo_wine ok(GetFocus() == hCombo,
+    ok(GetFocus() == hCombo,
        "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
        GetFocus());
 
     result = SendMessage(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
     ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n",
        GetLastError());
-    todo_wine ok(GetFocus() == hCombo,
+    ok(GetFocus() == hCombo,
        "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
        GetFocus());
-    todo_wine ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0),
+    ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0),
        "The dropdown list should still be visible.\n");
 
     result = SendMessage(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
     ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n",
        GetLastError());
-    ok(GetFocus() == hEdit,
+    todo_wine ok(GetFocus() == hEdit,
        "Focus not on ComboBoxEx's Edit Control, instead on %p\n",
        GetFocus());
     ok(!SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0),




More information about the wine-cvs mailing list