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: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2c01333d03
commit
fdbb46faf2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue