From: Qian Hong Subject: [PATCH] user32: Don't send message to get window text, avoid a deadlock. Message-Id: <52A1CC80.9040907@codeweavers.com> Date: Fri, 06 Dec 2013 21:09:20 +0800 - Fixed http://bugs.winehq.org/show_bug.cgi?id=27282, affects Arcania: Gothic 4 and online bank of abchina and - Makes Anastasius happy :p --- dlls/user32/win.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 275b93c..01f5174 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2678,11 +2678,6 @@ INT WINAPI GetWindowTextA( HWND hwnd, LPSTR lpString, INT nMaxCount ) WCHAR *buffer; if (!lpString) return 0; - - if (WIN_IsCurrentProcess( hwnd )) - return (INT)SendMessageA( hwnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); - - /* when window belongs to other process, don't send a message */ if (nMaxCount <= 0) return 0; if (!(buffer = HeapAlloc( GetProcessHeap(), 0, nMaxCount * sizeof(WCHAR) ))) return 0; get_server_window_text( hwnd, buffer, nMaxCount ); @@ -2723,11 +2718,6 @@ INT WINAPI InternalGetWindowText(HWND hwnd,LPWSTR lpString,INT nMaxCount ) INT WINAPI GetWindowTextW( HWND hwnd, LPWSTR lpString, INT nMaxCount ) { if (!lpString) return 0; - - if (WIN_IsCurrentProcess( hwnd )) - return (INT)SendMessageW( hwnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString ); - - /* when window belongs to other process, don't send a message */ if (nMaxCount <= 0) return 0; get_server_window_text( hwnd, lpString, nMaxCount ); return strlenW(lpString);