mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 18:05:49 +00:00
user32/tests: Fix a few more assumptions about window positions.
This commit is contained in:
parent
f3eebcfa4d
commit
e79b129064
|
@ -3466,7 +3466,8 @@ static void test_Input_mouse(void)
|
||||||
100, 100, 100, 100, 0, NULL, NULL, NULL);
|
100, 100, 100, 100, 0, NULL, NULL, NULL);
|
||||||
ok(button_win != 0, "CreateWindow failed\n");
|
ok(button_win != 0, "CreateWindow failed\n");
|
||||||
|
|
||||||
pt.x = pt.y = 150;
|
pt.x = pt.y = 50;
|
||||||
|
ClientToScreen(button_win, &pt);
|
||||||
hwnd = WindowFromPoint(pt);
|
hwnd = WindowFromPoint(pt);
|
||||||
if (hwnd != button_win)
|
if (hwnd != button_win)
|
||||||
{
|
{
|
||||||
|
@ -3476,7 +3477,7 @@ static void test_Input_mouse(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* simple button click test */
|
/* simple button click test */
|
||||||
simulate_click(TRUE, 150, 150);
|
simulate_click(TRUE, pt.x, pt.y);
|
||||||
got_button_down = got_button_up = FALSE;
|
got_button_down = got_button_up = FALSE;
|
||||||
while (wait_for_message(&msg))
|
while (wait_for_message(&msg))
|
||||||
{
|
{
|
||||||
|
@ -3501,7 +3502,7 @@ static void test_Input_mouse(void)
|
||||||
ok(static_win != 0, "CreateWindow failed\n");
|
ok(static_win != 0, "CreateWindow failed\n");
|
||||||
def_static_proc = (void*)SetWindowLongPtrA(static_win,
|
def_static_proc = (void*)SetWindowLongPtrA(static_win,
|
||||||
GWLP_WNDPROC, (LONG_PTR)static_hook_proc);
|
GWLP_WNDPROC, (LONG_PTR)static_hook_proc);
|
||||||
simulate_click(FALSE, 150, 150);
|
simulate_click(FALSE, pt.x, pt.y);
|
||||||
hittest_no = 0;
|
hittest_no = 0;
|
||||||
got_button_down = got_button_up = FALSE;
|
got_button_down = got_button_up = FALSE;
|
||||||
while (wait_for_message(&msg))
|
while (wait_for_message(&msg))
|
||||||
|
@ -3531,7 +3532,9 @@ static void test_Input_mouse(void)
|
||||||
ok(static_win != 0, "CreateWindow failed\n");
|
ok(static_win != 0, "CreateWindow failed\n");
|
||||||
def_static_proc = (void*)SetWindowLongPtrA(static_win,
|
def_static_proc = (void*)SetWindowLongPtrA(static_win,
|
||||||
GWLP_WNDPROC, (LONG_PTR)static_hook_proc);
|
GWLP_WNDPROC, (LONG_PTR)static_hook_proc);
|
||||||
simulate_click(TRUE, 150, 150);
|
pt.x = pt.y = 50;
|
||||||
|
ClientToScreen(static_win, &pt);
|
||||||
|
simulate_click(TRUE, pt.x, pt.y);
|
||||||
hittest_no = 0;
|
hittest_no = 0;
|
||||||
got_button_down = got_button_up = FALSE;
|
got_button_down = got_button_up = FALSE;
|
||||||
while (wait_for_message(&msg))
|
while (wait_for_message(&msg))
|
||||||
|
@ -3565,7 +3568,9 @@ static void test_Input_mouse(void)
|
||||||
hittest_no = 0;
|
hittest_no = 0;
|
||||||
got_button_down = got_button_up = FALSE;
|
got_button_down = got_button_up = FALSE;
|
||||||
WaitForSingleObject(thread_data.start_event, INFINITE);
|
WaitForSingleObject(thread_data.start_event, INFINITE);
|
||||||
simulate_click(FALSE, 150, 150);
|
pt.x = pt.y = 50;
|
||||||
|
ClientToScreen(thread_data.win, &pt);
|
||||||
|
simulate_click(FALSE, pt.x, pt.y);
|
||||||
while (wait_for_message(&msg))
|
while (wait_for_message(&msg))
|
||||||
{
|
{
|
||||||
DispatchMessageA(&msg);
|
DispatchMessageA(&msg);
|
||||||
|
@ -3593,7 +3598,9 @@ static void test_Input_mouse(void)
|
||||||
"AttachThreadInput failed\n");
|
"AttachThreadInput failed\n");
|
||||||
while (wait_for_message(&msg)) DispatchMessageA(&msg);
|
while (wait_for_message(&msg)) DispatchMessageA(&msg);
|
||||||
SetWindowPos(thread_data.win, button_win, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
|
SetWindowPos(thread_data.win, button_win, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
|
||||||
simulate_click(TRUE, 150, 150);
|
pt.x = pt.y = 50;
|
||||||
|
ClientToScreen(thread_data.win, &pt);
|
||||||
|
simulate_click(TRUE, pt.x, pt.y);
|
||||||
while (wait_for_message(&msg))
|
while (wait_for_message(&msg))
|
||||||
{
|
{
|
||||||
DispatchMessageA(&msg);
|
DispatchMessageA(&msg);
|
||||||
|
@ -3615,7 +3622,9 @@ static void test_Input_mouse(void)
|
||||||
ok(hwnd != 0, "CreateWindow failed\n");
|
ok(hwnd != 0, "CreateWindow failed\n");
|
||||||
SetCapture(button_win);
|
SetCapture(button_win);
|
||||||
got_button_down = got_button_up = FALSE;
|
got_button_down = got_button_up = FALSE;
|
||||||
simulate_click(FALSE, 50, 50);
|
pt.x = pt.y = 50;
|
||||||
|
ClientToScreen(hwnd, &pt);
|
||||||
|
simulate_click(FALSE, pt.x, pt.y);
|
||||||
while (wait_for_message(&msg))
|
while (wait_for_message(&msg))
|
||||||
{
|
{
|
||||||
DispatchMessageA(&msg);
|
DispatchMessageA(&msg);
|
||||||
|
@ -3641,7 +3650,9 @@ static void test_Input_mouse(void)
|
||||||
0, 0, 100, 100, button_win, NULL, NULL, NULL);
|
0, 0, 100, 100, button_win, NULL, NULL, NULL);
|
||||||
ok(hwnd != 0, "CreateWindow failed\n");
|
ok(hwnd != 0, "CreateWindow failed\n");
|
||||||
got_button_down = got_button_up = FALSE;
|
got_button_down = got_button_up = FALSE;
|
||||||
simulate_click(TRUE, 150, 150);
|
pt.x = pt.y = 50;
|
||||||
|
ClientToScreen(hwnd, &pt);
|
||||||
|
simulate_click(TRUE, pt.x, pt.y);
|
||||||
while (wait_for_message(&msg))
|
while (wait_for_message(&msg))
|
||||||
{
|
{
|
||||||
DispatchMessageA(&msg);
|
DispatchMessageA(&msg);
|
||||||
|
|
|
@ -17470,7 +17470,8 @@ static void test_keyflags(void)
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
test_window = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
test_window = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||||
100, 100, 200, 200, 0, 0, 0, NULL);
|
0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
|
||||||
|
0, 0, 0, NULL);
|
||||||
|
|
||||||
flush_events();
|
flush_events();
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
|
@ -17705,8 +17706,11 @@ static void test_hotkey(void)
|
||||||
"unexpected error %ld\n", GetLastError());
|
"unexpected error %ld\n", GetLastError());
|
||||||
|
|
||||||
test_window = CreateWindowExA(0, "HotkeyWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
test_window = CreateWindowExA(0, "HotkeyWindowClass", NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||||
100, 100, 200, 200, 0, 0, 0, NULL);
|
0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
|
||||||
|
0, 0, 0, NULL);
|
||||||
|
|
||||||
|
SetForegroundWindow(test_window);
|
||||||
|
flush_events();
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
|
|
Loading…
Reference in a new issue