From: Rémi Bernon rbernon@codeweavers.com
--- dlls/dinput/tests/device8.c | 17 ++--------------- dlls/win32u/message.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c index 5bcab668d6b..14098ec39c7 100644 --- a/dlls/dinput/tests/device8.c +++ b/dlls/dinput/tests/device8.c @@ -2000,7 +2000,6 @@ static void test_hid_touch_screen(void) ok( !res, "MsgWaitForMultipleObjects returned %#lx\n", res );
res = msg_wait_for_events( 1, &touchdown_event, 10 ); - todo_wine ok( res == 0, "WaitForSingleObject returned %#lx\n", res ); res = msg_wait_for_events( 1, &touchleave_event, 500 ); todo_wine @@ -2137,7 +2136,6 @@ static void test_hid_touch_screen(void) bus_send_hid_input( file, &desc, &touch_single, sizeof(touch_single) );
res = msg_wait_for_events( 1, &touchdown_event, 1000 ); - todo_wine ok( res == 0, "WaitForSingleObject returned %#lx\n", res ); res = msg_wait_for_events( 1, &touchleave_event, 10 ); ok( res == WAIT_TIMEOUT, "WaitForSingleObject returned %#lx\n", res ); @@ -2172,16 +2170,13 @@ static void test_hid_touch_screen(void) res = msg_wait_for_events( 1, &touchdown_event, 10 ); ok( res == WAIT_TIMEOUT, "WaitForSingleObject returned %#lx\n", res ); ok( pointer_enter_count == 0, "got pointer_enter_count %u\n", pointer_enter_count ); - todo_wine ok( pointer_up_count == 1, "got pointer_up_count %u\n", pointer_up_count );
expect_flags = POINTER_MESSAGE_FLAG_PRIMARY | POINTER_MESSAGE_FLAG_CONFIDENCE; - todo_wine ok( HIWORD( pointer_wparam[0] ) == expect_flags, "got wparam %#Ix\n", pointer_wparam[0] ); - ok( LOWORD( pointer_wparam[0] ) == id, "got wparam %#Ix\n", pointer_wparam[0] ); todo_wine + ok( LOWORD( pointer_wparam[0] ) == id, "got wparam %#Ix\n", pointer_wparam[0] ); ok( LOWORD( pointer_lparam[0] ) * 128 / width == 0x08, "got lparam %#Ix\n", pointer_lparam[0] ); - todo_wine ok( HIWORD( pointer_lparam[0] ) * 128 / height == 0x10, "got lparam %#Ix\n", pointer_lparam[0] ); ok( pointer_wparam[1] == 0, "got wparam %#Ix\n", pointer_wparam[1] ); ok( pointer_lparam[1] == 0, "got lparam %#Ix\n", pointer_lparam[1] ); @@ -2193,10 +2188,8 @@ static void test_hid_touch_screen(void) bus_send_hid_input( file, &desc, &touch_multiple, sizeof(touch_multiple) );
res = msg_wait_for_events( 1, &touchdown_event, 1000 ); - todo_wine ok( res == 0, "WaitForSingleObject returned %#lx\n", res ); res = msg_wait_for_events( 1, &touchdown_event, 1000 ); - todo_wine ok( res == 0, "WaitForSingleObject returned %#lx\n", res ); res = msg_wait_for_events( 1, &touchleave_event, 10 ); ok( res == WAIT_TIMEOUT, "WaitForSingleObject returned %#lx\n", res ); @@ -2243,26 +2236,20 @@ static void test_hid_touch_screen(void) res = msg_wait_for_events( 1, &touchdown_event, 10 ); ok( res == WAIT_TIMEOUT, "WaitForSingleObject returned %#lx\n", res ); ok( pointer_enter_count == 0, "got pointer_enter_count %u\n", pointer_enter_count ); - todo_wine ok( pointer_up_count == 2, "got pointer_up_count %u\n", pointer_up_count );
expect_flags = POINTER_MESSAGE_FLAG_PRIMARY | POINTER_MESSAGE_FLAG_CONFIDENCE; - todo_wine ok( HIWORD( pointer_wparam[0] ) == expect_flags, "got wparam %#Ix\n", pointer_wparam[0] ); - ok( LOWORD( pointer_wparam[0] ) == id, "got wparam %#Ix\n", pointer_wparam[0] ); todo_wine + ok( LOWORD( pointer_wparam[0] ) == id, "got wparam %#Ix\n", pointer_wparam[0] ); ok( LOWORD( pointer_lparam[0] ) * 128 / width == 0x08, "got lparam %#Ix\n", pointer_lparam[0] ); - todo_wine ok( HIWORD( pointer_lparam[0] ) * 128 / height == 0x10, "got lparam %#Ix\n", pointer_lparam[0] );
expect_flags = POINTER_MESSAGE_FLAG_CONFIDENCE; - todo_wine ok( HIWORD( pointer_wparam[1] ) == expect_flags, "got wparam %#Ix\n", pointer_wparam[1] ); todo_wine ok( LOWORD( pointer_wparam[1] ) == id + 1, "got wparam %#Ix\n", pointer_wparam[1] ); - todo_wine ok( LOWORD( pointer_lparam[1] ) * 128 / width == 0x18, "got lparam %#Ix\n", pointer_lparam[1] ); - todo_wine ok( HIWORD( pointer_lparam[1] ) * 128 / height == 0x20, "got lparam %#Ix\n", pointer_lparam[1] );
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index e8d456689b6..d3c4047b30a 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -2319,6 +2319,16 @@ static void handle_keyboard_repeat_message( HWND hwnd ) NtUserPostMessage( hwnd, msg->message, msg->wParam, msg->lParam ); }
+/*********************************************************************** + * process_pointer_message + * + * returns TRUE if the contents of 'msg' should be passed to the application + */ +static BOOL process_pointer_message( MSG *msg, UINT hw_id, const struct hardware_msg_data *msg_data ) +{ + msg->pt = point_phys_to_win_dpi( msg->hwnd, msg->pt ); + return TRUE; +}
/*********************************************************************** * process_keyboard_message @@ -2669,6 +2679,8 @@ static BOOL process_hardware_message( MSG *msg, UINT hw_id, const struct hardwar ret = process_keyboard_message( msg, hw_id, hwnd_filter, first, last, remove ); else if (is_mouse_message( msg->message )) ret = process_mouse_message( msg, hw_id, msg_data->info, hwnd_filter, first, last, remove ); + else if (msg->message >= WM_POINTERUPDATE && msg->message <= WM_POINTERLEAVE) + ret = process_pointer_message( msg, hw_id, msg_data ); else if (msg->message == WM_WINE_CLIPCURSOR) process_wine_clipcursor( msg->hwnd, msg->wParam, msg->lParam ); else if (msg->message == WM_WINE_SETCURSOR)