Commit 9b6b0905 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11.drv: Don't remap root_window relative coordinates.

We already converted coordinates from root to virtual screen, we shouldn't need to remap them. This is actually no-op because when window == root_window, hwnd is the desktop window. In which case it isn't RTL, and MapWindowPoints is no-op too. It makes things less confusing and it will help later cases when we get root-relative coordinates for other windows. Based on a patch from Gabriel Ivăncescu <gabrielopcode@gmail.com>. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46309Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6d6b4202
......@@ -599,15 +599,18 @@ static void map_event_coords( HWND hwnd, Window window, struct x11drv_win_data *
TRACE( "hwnd %p, window %lx, data %p, input %p\n", hwnd, window, data, input );
if (window == root_window) pt = root_to_virtual_screen( pt.x, pt.y );
if (window == data->whole_window)
else
{
pt.x += data->whole_rect.left - data->client_rect.left;
pt.y += data->whole_rect.top - data->client_rect.top;
}
if (window == data->whole_window)
{
pt.x += data->whole_rect.left - data->client_rect.left;
pt.y += data->whole_rect.top - data->client_rect.top;
}
if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
pt.x = data->client_rect.right - data->client_rect.left - 1 - pt.x;
MapWindowPoints( hwnd, 0, &pt, 1 );
if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
pt.x = data->client_rect.right - data->client_rect.left - 1 - pt.x;
MapWindowPoints( hwnd, 0, &pt, 1 );
}
TRACE( "mapped %s to %s\n", wine_dbgstr_point( (POINT *)&input->u.mi.dx ), wine_dbgstr_point( &pt ) );
......
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