wine-staging/patches/user32-FindWindowEx/0003-user32-Avoid-sending-window-messages-in-FindWindowEx.patch

55 lines
2.0 KiB
Diff

From 5848b744b5510da0101458f91b4a5ec1593dfadb Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 12 Nov 2014 07:43:13 +0100
Subject: user32: Avoid sending window messages in FindWindowExW.
---
dlls/user32/tests/win.c | 3 ---
dlls/user32/win.c | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index c1a6130..d7ba329 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -7054,7 +7054,6 @@ static void test_FindWindowEx(void)
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "" );
ok( found == NULL, "expected a NULL hwnd\n" );
- todo_wine
ok( num_gettext_msgs == 0, "got %d WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
@@ -7065,7 +7064,6 @@ static void test_FindWindowEx(void)
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "caption" );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- todo_wine
ok( num_gettext_msgs == 0, "got %d WM_GETTEXT messages\n", num_gettext_msgs );
DestroyWindow( hwnd );
@@ -7076,7 +7074,6 @@ static void test_FindWindowEx(void)
num_gettext_msgs = 0;
found = FindWindowExA( 0, 0, "MainWindowClass", "" );
ok( found == hwnd, "found is %p, expected a valid hwnd\n", found );
- todo_wine
ok( num_gettext_msgs == 0, "got %d WM_GETTEXT messages\n", num_gettext_msgs );
num_gettext_msgs = 0;
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 73cad0c..0516193 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1941,7 +1941,7 @@ HWND WINAPI FindWindowExW( HWND parent, HWND child, LPCWSTR className, LPCWSTR t
{
while (list[i])
{
- if (GetWindowTextW( list[i], buffer, len + 1 ))
+ if (InternalGetWindowText( list[i], buffer, len + 1 ))
{
if (!strcmpiW( buffer, title )) break;
}
--
2.1.3