Re: [PATCH] winex11.drv: get hwnd for injected mouse events
"Lei Zhang" <thestig(a)google.com> writes:
--- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -278,6 +278,7 @@ void X11DRV_send_mouse_input( HWND hwnd, DWORD flags, DWORD x, DWORD y, { pt.x = (x * screen_width) >> 16; pt.y = (y * screen_height) >> 16; + hwnd = GetAncestor(WindowFromPoint(pt), GA_PARENT);
This should not be needed, for injected events the window is determined on the server side. -- Alexandre Julliard julliard(a)winehq.org
On Fri, Feb 15, 2008 at 2:26 AM, Alexandre Julliard <julliard(a)winehq.org> wrote:
"Lei Zhang" <thestig(a)google.com> writes:
--- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -278,6 +278,7 @@ void X11DRV_send_mouse_input( HWND hwnd, DWORD flags, DWORD x, DWORD y, { pt.x = (x * screen_width) >> 16; pt.y = (y * screen_height) >> 16; + hwnd = GetAncestor(WindowFromPoint(pt), GA_PARENT);
This should not be needed, for injected events the window is determined on the server side.
-- Alexandre Julliard julliard(a)winehq.org
I've definitely seen cases where it doesn't work. I'll write a test...
participants (2)
-
Alexandre Julliard -
Lei Zhang