Commit 91a791e5 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

user32/tests: Preserve the initial GetLastError() value for test_ClipboardOwner().

One of the tests expects GetLastError() to still return 0xdeadbeef after has_no_open_wnd(), which would not be the case if another process did open the clipboard. Signed-off-by: 's avatarFrancois Gouget <fgouget@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cd0e0bbc
......@@ -65,6 +65,7 @@ static BOOL open_clipboard(HWND hwnd)
static BOOL has_no_open_wnd(void)
{
DWORD start = GetTickCount();
DWORD le = GetLastError();
while (1)
{
HWND clipwnd = GetOpenClipboardWindow();
......@@ -72,7 +73,7 @@ static BOOL has_no_open_wnd(void)
if (GetTickCount() - start > 100)
{
char classname[256];
DWORD le = GetLastError();
le = GetLastError();
/* See open_clipboard() */
GetClassNameA(clipwnd, classname, ARRAY_SIZE(classname));
trace("%p (%s) opened the clipboard\n", clipwnd, classname);
......@@ -80,6 +81,7 @@ static BOOL has_no_open_wnd(void)
return FALSE;
}
Sleep(15);
SetLastError(le);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment