[PATCH v3 04/10] shell32/autocomplete: Don't call ShowWindow unless auto-suggest listbox is enabled

Huw Davies huw at codeweavers.com
Mon Sep 10 03:43:59 CDT 2018


On Sat, Sep 08, 2018 at 02:50:50PM +0300, Gabriel Ivăncescu wrote:
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
>  dlls/shell32/autocomplete.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

Looks good.

> 
> diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
> index 7319d84..93be8e3 100644
> --- a/dlls/shell32/autocomplete.c
> +++ b/dlls/shell32/autocomplete.c
> @@ -146,7 +146,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))
> @@ -177,7 +178,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:
> @@ -311,7 +313,6 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
>          }
>          default:
>              return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam);
> -
>      }
>  
>      return 0;
> @@ -364,6 +365,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