Dmitry Timoshkov : user32: FindWindow() should treat an empty title same way as NULL.

Alexandre Julliard julliard at winehq.org
Thu Dec 2 16:30:53 CST 2010


Module: wine
Branch: stable
Commit: 9d0eda9f67506fef6e481a61c3f00d29eb3e2fda
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9d0eda9f67506fef6e481a61c3f00d29eb3e2fda

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Tue Oct 19 14:22:53 2010 +0900

user32: FindWindow() should treat an empty title same way as NULL.

(cherry picked from commit 2f0b9dd3bfa3820abd89846d45eb78578b627b3b)

---

 dlls/user32/win.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index cbc949c..aee81cd 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1694,7 +1694,14 @@ HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR t
     {
         while (list[i])
         {
-            if (GetWindowTextW( list[i], buffer, len + 1 ) && !strcmpiW( buffer, title )) break;
+            if (GetWindowTextW( list[i], buffer, len + 1 ))
+            {
+                if (!strcmpiW( buffer, title )) break;
+            }
+            else
+            {
+                if (!title[0]) break;
+            }
             i++;
         }
     }




More information about the wine-cvs mailing list