Commit fdbb46fa authored by Connor McAdams's avatar Connor McAdams Committed by Alexandre Julliard

oleacc: Check proper GUI thread for window focus.

Check for window focus against the current foreground window's thread GUI data rather than the currently executing thread's GUI data. Signed-off-by: 's avatarConnor McAdams <conmanx360@gmail.com> Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 2c01333d
......@@ -227,6 +227,7 @@ static HRESULT WINAPI Client_get_accRole(IAccessible *iface, VARIANT varID, VARI
static HRESULT WINAPI Client_get_accState(IAccessible *iface, VARIANT varID, VARIANT *pvarState)
{
Client *This = impl_from_Client(iface);
GUITHREADINFO info;
LONG style;
TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pvarState);
......@@ -244,7 +245,9 @@ static HRESULT WINAPI Client_get_accState(IAccessible *iface, VARIANT varID, VAR
V_I4(pvarState) |= STATE_SYSTEM_UNAVAILABLE;
else if(IsWindow(This->hwnd))
V_I4(pvarState) |= STATE_SYSTEM_FOCUSABLE;
if(GetFocus() == This->hwnd)
info.cbSize = sizeof(info);
if(GetGUIThreadInfo(0, &info) && info.hwndFocus == This->hwnd)
V_I4(pvarState) |= STATE_SYSTEM_FOCUSED;
if(!(style & WS_VISIBLE))
V_I4(pvarState) |= STATE_SYSTEM_INVISIBLE;
......
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