Commit 7d748b6b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/comboex: Don't invalidate all windows if Edit box isn't set up.

parent 7deb2779
...@@ -1149,7 +1149,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam) ...@@ -1149,7 +1149,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
*/ */
ShowWindow (infoPtr->hwndEdit, SW_SHOW); ShowWindow (infoPtr->hwndEdit, SW_SHOW);
InvalidateRect (infoPtr->hwndCombo, 0, TRUE); InvalidateRect (infoPtr->hwndCombo, 0, TRUE);
InvalidateRect (infoPtr->hwndEdit, 0, TRUE); if (infoPtr->hwndEdit) InvalidateRect (infoPtr->hwndEdit, 0, TRUE);
cursel = SendMessageW (infoPtr->hwndCombo, CB_GETCURSEL, 0, 0); cursel = SendMessageW (infoPtr->hwndCombo, CB_GETCURSEL, 0, 0);
if (cursel == -1) { if (cursel == -1) {
cmp_func_t cmptext = get_cmp_func(infoPtr); cmp_func_t cmptext = get_cmp_func(infoPtr);
...@@ -1164,8 +1164,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam) ...@@ -1164,8 +1164,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
if ((cursel == n) || ((INT_PTR)item == CB_ERR)) { if ((cursel == n) || ((INT_PTR)item == CB_ERR)) {
TRACE("failed to find match??? item=%p cursel=%d\n", TRACE("failed to find match??? item=%p cursel=%d\n",
item, cursel); item, cursel);
if (infoPtr->hwndEdit) if (infoPtr->hwndEdit) SetFocus(infoPtr->hwndEdit);
SetFocus(infoPtr->hwndEdit);
return 0; return 0;
} }
} }
...@@ -1174,8 +1173,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam) ...@@ -1174,8 +1173,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
if ((INT_PTR)item == CB_ERR) { if ((INT_PTR)item == CB_ERR) {
TRACE("failed to find match??? item=%p cursel=%d\n", TRACE("failed to find match??? item=%p cursel=%d\n",
item, cursel); item, cursel);
if (infoPtr->hwndEdit) if (infoPtr->hwndEdit) SetFocus(infoPtr->hwndEdit);
SetFocus(infoPtr->hwndEdit);
return 0; return 0;
} }
} }
...@@ -1271,8 +1269,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam) ...@@ -1271,8 +1269,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
* after passing the command to the parent of the ComboEx. * after passing the command to the parent of the ComboEx.
*/ */
lret = SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf); lret = SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
if (infoPtr->hwndEdit) if (infoPtr->hwndEdit) SetFocus(infoPtr->hwndEdit);
SetFocus(infoPtr->hwndEdit);
return lret; return lret;
} }
return 0; return 0;
...@@ -1374,8 +1371,7 @@ static LRESULT COMBOEX_DrawItem (const COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT con ...@@ -1374,8 +1371,7 @@ static LRESULT COMBOEX_DrawItem (const COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT con
GetWindowRect (infoPtr->hwndSelf, &exrc); GetWindowRect (infoPtr->hwndSelf, &exrc);
GetWindowRect (infoPtr->hwndCombo, &cbrc); GetWindowRect (infoPtr->hwndCombo, &cbrc);
edrc.left=edrc.top=edrc.right=edrc.bottom=-1; edrc.left=edrc.top=edrc.right=edrc.bottom=-1;
if (infoPtr->hwndEdit) if (infoPtr->hwndEdit) GetWindowRect (infoPtr->hwndEdit, &edrc);
GetWindowRect (infoPtr->hwndEdit, &edrc);
TRACE("window rects ex=(%s), cb=(%s), ed=(%s)\n", TRACE("window rects ex=(%s), cb=(%s), ed=(%s)\n",
wine_dbgstr_rect(&exrc), wine_dbgstr_rect(&cbrc), wine_dbgstr_rect(&exrc), wine_dbgstr_rect(&cbrc),
wine_dbgstr_rect(&edrc)); wine_dbgstr_rect(&edrc));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment