Module: wine Branch: master Commit: 10aa13a98e4346e8af5e95a20eaefec7223a8c76 URL: http://source.winehq.org/git/wine.git/?a=commit;h=10aa13a98e4346e8af5e95a20e...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 13 12:42:47 2010 +0100
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(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 5447a40..be3033b 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 71b31cc..a763798 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)