=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: shell32/autocomplete: Forward to the original listbox proc outside the switch.

Alexandre Julliard julliard at winehq.org
Wed Apr 3 15:26:19 CDT 2019


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

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Tue Apr  2 14:28:12 2019 +0300

shell32/autocomplete: Forward to the original listbox proc outside the switch.

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 | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index bd9b872..ed8b270 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -801,23 +801,21 @@ static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
         case WM_MOUSEMOVE:
             sel = SendMessageW(hwnd, LB_ITEMFROMPOINT, 0, lParam);
             SendMessageW(hwnd, LB_SETCURSEL, sel, 0);
-            break;
+            return 0;
         case WM_LBUTTONDOWN:
             sel = SendMessageW(hwnd, LB_GETCURSEL, 0, 0);
             if (sel < 0)
-                break;
+                return 0;
             len = SendMessageW(hwnd, LB_GETTEXTLEN, sel, 0);
             if (!(msg = heap_alloc((len + 1) * sizeof(WCHAR))))
-                break;
+                return 0;
             len = SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg);
             set_text_and_selection(This, This->hwndEdit, msg, 0, len);
             hide_listbox(This, hwnd, TRUE);
             heap_free(msg);
-            break;
-        default:
-            return CallWindowProcW(This->wpOrigLBoxProc, hwnd, uMsg, wParam, lParam);
+            return 0;
     }
-    return 0;
+    return CallWindowProcW(This->wpOrigLBoxProc, hwnd, uMsg, wParam, lParam);
 }
 
 static void create_listbox(IAutoCompleteImpl *This)




More information about the wine-cvs mailing list