From 185fdaadc69014bb6c8d8acb4cd13128aa3609cb Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Mon, 4 Oct 2010 22:56:21 +0200 Subject: user32: fix FindWindowEx behavior if window name is an empty charachter --- dlls/user32/win.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index ee44278..7e17728 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1756,6 +1756,10 @@ HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR t { while (list[i]) { + /* Handle special case where empty title bar or no title bar exists, so GetWindowsText would return NULL + but if title is also an empty char we still have a match */ + if (!GetWindowTextW( list[i], buffer, len + 1 ) && !title[0]) break; + if (GetWindowTextW( list[i], buffer, len + 1 ) && !strcmpiW( buffer, title )) break; i++; } -- 1.7.0.4