winex11.drv: Remember last window that had the XIC focus and use it in ToUnicode() to make dead keys work more reliably.

Alexandre Julliard julliard at winehq.org
Thu Jul 22 06:14:18 CDT 2010


Dmitry Timoshkov <dmitry at codeweavers.com> writes:

> @@ -2541,9 +2541,13 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState
>      e.state = 0;
>      e.type = KeyPress;
>  
> -    focus = GetFocus();
> -    if (focus) focus = GetAncestor( focus, GA_ROOT );
> -    if (!focus) focus = GetActiveWindow();
> +    focus = x11drv_thread_data()->last_xic_hwnd;
> +    if (!focus)
> +    {
> +        HWND focus = GetFocus();
> +        if (focus) focus = GetAncestor( focus, GA_ROOT );
> +        if (!focus) focus = GetActiveWindow();
> +    }

Have you tested that code path? This can't possibly work.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list