From: Rémi Bernon rbernon@codeweavers.com
Some touch events don't have the window set properly, we don't really need it but we need the mouse coordinate to be mapped correctly.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57601 --- dlls/winex11.drv/mouse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 5f6b9f34d2a..9d25b71c992 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -497,7 +497,9 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x TRACE( "hwnd %p, window %lx, event_root %lx, x_root %d, y_root %d, input %p\n", hwnd, window, event_root, x_root, y_root, input );
- if (!hwnd) + if (window == root_window) pt = root_to_virtual_screen( pt.x, pt.y ); + else if (event_root == root_window) pt = root_to_virtual_screen( x_root, y_root ); + else if (!hwnd) { thread_data = x11drv_thread_data(); if (!thread_data->clipping_cursor) return; @@ -507,9 +509,7 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x } else if ((data = get_win_data( hwnd ))) { - if (window == root_window) pt = root_to_virtual_screen( pt.x, pt.y ); - else if (event_root == root_window) pt = root_to_virtual_screen( x_root, y_root ); - else if (window == data->client_window) + if (window == data->client_window) { pt.x += data->rects.client.left; pt.y += data->rects.client.top;