Module: wine Branch: master Commit: cf6c76b3b4a984e207d32c35f8f10b1f2ed14534 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cf6c76b3b4a984e207d32c35f8...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Sun Feb 20 15:16:03 2011 +0800
user32: Cope with failing SetForegroundWindow().
---
dlls/user32/tests/win.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index e440a96..cca222f 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -3346,6 +3346,7 @@ static void test_SetParent(void) HWND desktop = GetDesktopWindow(); HMENU hMenu; HWND ret, parent, child1, child2, child3, child4, sibling, popup; + BOOL bret;
parent = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW, 100, 100, 200, 200, 0, 0, 0, NULL); @@ -3474,9 +3475,13 @@ todo_wine SetFocus(parent); check_active_state(parent, 0, parent);
+ bret = SetForegroundWindow(popup); todo_wine { - ok(SetForegroundWindow(popup), "SetForegroundWindow() failed\n"); - check_active_state(popup, 0, popup); + ok(bret || broken(!bret), "SetForegroundWindow() failed\n"); + if (!bret) + check_active_state(popup, 0, popup); + else + check_active_state(popup, popup, popup); }
ok(DestroyWindow(parent), "DestroyWindow() failed\n");