[PATCH v5 2/4] shell32/autocomplete: Reset the enumerator when losing focus if the edit control is not visible anymore
Gabriel Ivăncescu
gabrielopcode at gmail.com
Thu Nov 1 14:41:54 CDT 2018
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/shell32/autocomplete.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index d557a4a..0770549 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -602,10 +602,14 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
hide_listbox(This, This->hwndListBox, TRUE);
return 0;
case WM_KILLFOCUS:
- if ((This->options & ACO_AUTOSUGGEST) && ((HWND)wParam != This->hwndListBox))
+ if (This->options & ACO_AUTOSUGGEST)
{
+ if ((HWND)wParam == This->hwndListBox) break;
hide_listbox(This, This->hwndListBox, FALSE);
}
+
+ /* Reset the enumerator if it's not visible anymore */
+ if (!IsWindowVisible(hwnd)) free_enum_strs(This);
break;
case WM_KEYDOWN:
return ACEditSubclassProc_KeyDown(This, hwnd, uMsg, wParam, lParam);
--
1.9.1
More information about the wine-devel
mailing list