From 10aa13a98e4346e8af5e95a20eaefec7223a8c76 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 13 Dec 2010 12:42:47 +0100 Subject: [PATCH] winex11: Fix event coordinates mapping for the root window in the explorer process. --- dlls/winex11.drv/event.c | 1 + dlls/winex11.drv/mouse.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 5447a40ecf2..be3033b09bc 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -788,6 +788,7 @@ static void X11DRV_Expose( HWND hwnd, XEvent *xev ) flags |= RDW_ALLCHILDREN; } + else OffsetRect( &rect, virtual_screen_rect.left, virtual_screen_rect.top ); RedrawWindow( hwnd, &rect, 0, flags ); } diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 71b31cc3e58..a7637989d35 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -239,6 +239,11 @@ static HWND update_mouse_state( HWND hwnd, Window window, int x, int y, unsigned x += data->whole_rect.left - data->client_rect.left; y += data->whole_rect.top - data->client_rect.top; } + if (window == root_window) + { + x += virtual_screen_rect.left; + y += virtual_screen_rect.top; + } pt->x = x; pt->y = y; if (GetWindowLongW( data->hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)