=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: shell32/autocomplete: Reset the enumerator when losing focus if the edit control is not visible anymore.

Alexandre Julliard julliard at winehq.org
Mon Nov 5 15:51:52 CST 2018


Module: wine
Branch: master
Commit: 4f85424d58a4df3e9bf4fa36880b889231caa7e3
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4f85424d58a4df3e9bf4fa36880b889231caa7e3

Author: Gabriel Iv─âncescu <gabrielopcode at gmail.com>
Date:   Fri Nov  2 16:50:39 2018 +0200

shell32/autocomplete: Reset the enumerator when losing focus if the edit control is not visible anymore.

Signed-off-by: Gabriel Iv─âncescu <gabrielopcode at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 69d9cc8..3e55202 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -601,10 +601,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);




More information about the wine-cvs mailing list