comctl32: Fix for ComboBoxEx bug caused by focus change.
This commit is contained in:
parent
da0175ba71
commit
798afcf902
|
@ -1267,6 +1267,9 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lPa
|
||||||
InvalidateRect (infoPtr->hwndCombo, 0, 0);
|
InvalidateRect (infoPtr->hwndCombo, 0, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case CBN_SETFOCUS:
|
||||||
|
return SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/*
|
/*
|
||||||
* We have to change the handle since we are the control
|
* We have to change the handle since we are the control
|
||||||
|
|
|
@ -221,7 +221,7 @@ static void test_WM_LBUTTONDOWN(void)
|
||||||
result = SendMessage(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
|
result = SendMessage(hCombo, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
|
||||||
ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n",
|
ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
todo_wine ok(GetFocus() == hCombo,
|
ok(GetFocus() == hCombo,
|
||||||
"Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
|
"Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
|
||||||
GetFocus());
|
GetFocus());
|
||||||
ok(SendMessage(hComboEx, CB_GETDROPPEDSTATE, 0, 0),
|
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));
|
result = SendMessage(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
|
||||||
ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n",
|
ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
todo_wine ok(GetFocus() == hCombo,
|
ok(GetFocus() == hCombo,
|
||||||
"Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
|
"Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
|
||||||
GetFocus());
|
GetFocus());
|
||||||
|
|
||||||
|
@ -244,23 +244,23 @@ static void test_WM_LBUTTONDOWN(void)
|
||||||
result = SendMessage(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y));
|
result = SendMessage(hList, WM_MOUSEMOVE, 0, MAKELPARAM(x, y));
|
||||||
ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n",
|
ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
todo_wine ok(GetFocus() == hCombo,
|
ok(GetFocus() == hCombo,
|
||||||
"Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
|
"Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
|
||||||
GetFocus());
|
GetFocus());
|
||||||
|
|
||||||
result = SendMessage(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
|
result = SendMessage(hList, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
|
||||||
ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n",
|
ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
todo_wine ok(GetFocus() == hCombo,
|
ok(GetFocus() == hCombo,
|
||||||
"Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
|
"Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
|
||||||
GetFocus());
|
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");
|
"The dropdown list should still be visible.\n");
|
||||||
|
|
||||||
result = SendMessage(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
|
result = SendMessage(hList, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
|
||||||
ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n",
|
ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
ok(GetFocus() == hEdit,
|
todo_wine ok(GetFocus() == hEdit,
|
||||||
"Focus not on ComboBoxEx's Edit Control, instead on %p\n",
|
"Focus not on ComboBoxEx's Edit Control, instead on %p\n",
|
||||||
GetFocus());
|
GetFocus());
|
||||||
ok(!SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0),
|
ok(!SendMessage(hCombo, CB_GETDROPPEDSTATE, 0, 0),
|
||||||
|
|
Loading…
Reference in New Issue