[1/2] user32: fix FindWindowEx behavior if window name is an empty charachter
Dmitry Timoshkov
dmitry at codeweavers.com
Mon Oct 4 23:41:11 CDT 2010
Louis Lenders <xerox_xerox2000 at yahoo.co.uk> wrote:
> @@ -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++;
> }
It would be better to avoid duplicate GetWindowTextW() calls.
--
Dmitry.
More information about the wine-devel
mailing list