[PATCH v4 04/10] shell32/autocomplete: Don't call ShowWindow unless auto-suggest listbox is enabled
Gabriel Ivăncescu
gabrielopcode at gmail.com
Mon Sep 10 14:09:34 CDT 2018
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
dlls/shell32/autocomplete.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index 4160235..a76a01f 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -144,7 +144,8 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
switch (uMsg)
{
case CB_SHOWDROPDOWN:
- ShowWindow(This->hwndListBox, SW_HIDE);
+ if (This->options & ACO_AUTOSUGGEST)
+ ShowWindow(This->hwndListBox, SW_HIDE);
break;
case WM_KILLFOCUS:
if ((This->options & ACO_AUTOSUGGEST) && ((HWND)wParam != This->hwndListBox))
@@ -175,7 +176,8 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
}
}
- ShowWindow(This->hwndListBox, SW_HIDE);
+ if (This->options & ACO_AUTOSUGGEST)
+ ShowWindow(This->hwndListBox, SW_HIDE);
return 0;
case VK_LEFT:
case VK_RIGHT:
@@ -310,7 +312,6 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
}
default:
return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
-
}
return 0;
@@ -362,6 +363,8 @@ static void create_listbox(IAutoCompleteImpl *This)
This->wpOrigLBoxProc = (WNDPROC) SetWindowLongPtrW( This->hwndListBox, GWLP_WNDPROC, (LONG_PTR) ACLBoxSubclassProc);
SetWindowLongPtrW( This->hwndListBox, GWLP_USERDATA, (LONG_PTR)This);
}
+ else
+ This->options &= ~ACO_AUTOSUGGEST;
}
/**************************************************************************
--
1.9.1
More information about the wine-devel
mailing list