user32: Do not test window state on the HCBT_SETFOCUS event, it's undefined.

Dmitry Timoshkov dmitry at codeweavers.com
Tue Sep 21 03:54:17 CDT 2010


This patch eliminates many spurious failures when running win.c tests
under some Windows versions, even under XP it fails sometimes.
---
 dlls/user32/tests/win.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index e9dc0bd..1434bc8 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -1029,7 +1029,6 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
     case HCBT_MOVESIZE:
     case HCBT_MINMAX:
     case HCBT_ACTIVATE:
-    case HCBT_SETFOCUS:
 	if (pGetWindowInfo && IsWindow(hwnd))
 	{
 	    WINDOWINFO info;
@@ -1043,7 +1042,8 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
 	    verify_window_info(code_name, hwnd, &info);
 	}
         break;
-    /* on HCBT_DESTROYWND window state is undefined */
+    /* window state is undefined */
+    case HCBT_SETFOCUS:
     case HCBT_DESTROYWND:
         break;
     default:
-- 
1.7.0.6




More information about the wine-patches mailing list