winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
633 discussions
Start a n
N
ew thread
Connor McAdams : uiautomationcore: Implement UiaRaiseAutomationEvent.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: c5b2c0369b33ff7d6a9135c4e09cfb8e0031d083 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c5b2c0369b33ff7d6a9135c4e09cfb…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Tue May 23 13:38:00 2023 -0400 uiautomationcore: Implement UiaRaiseAutomationEvent. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 51 ++++++--- dlls/uiautomationcore/uia_client.c | 8 +- dlls/uiautomationcore/uia_event.c | 167 +++++++++++++++++++++++++++++ dlls/uiautomationcore/uia_main.c | 9 -- dlls/uiautomationcore/uia_private.h | 3 + 5 files changed, 211 insertions(+), 27 deletions(-)
1
0
0
0
Connor McAdams : uiautomationcore: Add support for cloning UiaCondition structures.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: 61712ec79f3b5f92f5482b4dff73652e707d8e34 URL:
https://gitlab.winehq.org/wine/wine/-/commit/61712ec79f3b5f92f5482b4dff7365…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Mon Jun 5 10:31:45 2023 -0400 uiautomationcore: Add support for cloning UiaCondition structures. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/uia_utils.c | 143 +++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/dlls/uiautomationcore/uia_utils.c b/dlls/uiautomationcore/uia_utils.c index 03416418cce..03fdef40e01 100644 --- a/dlls/uiautomationcore/uia_utils.c +++ b/dlls/uiautomationcore/uia_utils.c @@ -98,18 +98,159 @@ HRESULT get_interface_in_git(REFIID riid, DWORD git_cookie, IUnknown **ret_iface return S_OK; } +/* + * UiaCondition cloning functions. + */ +static void uia_condition_destroy(struct UiaCondition *cond) +{ + if (!cond) + return; + + switch (cond->ConditionType) + { + case ConditionType_Property: + { + struct UiaPropertyCondition *prop_cond = (struct UiaPropertyCondition *)cond; + + VariantClear(&prop_cond->Value); + break; + } + + case ConditionType_Not: + { + struct UiaNotCondition *not_cond = (struct UiaNotCondition *)cond; + + uia_condition_destroy(not_cond->pConditions); + break; + } + + case ConditionType_And: + case ConditionType_Or: + { + struct UiaAndOrCondition *and_or_cond = (struct UiaAndOrCondition *)cond; + int i; + + for (i = 0; i < and_or_cond->cConditions; i++) + uia_condition_destroy(and_or_cond->ppConditions[i]); + heap_free(and_or_cond->ppConditions); + break; + } + + default: + break; + } + + heap_free(cond); +} + +static HRESULT uia_condition_clone(struct UiaCondition **dst, struct UiaCondition *src) +{ + HRESULT hr = S_OK; + + *dst = NULL; + switch (src->ConditionType) + { + case ConditionType_True: + case ConditionType_False: + if (!(*dst = heap_alloc_zero(sizeof(*dst)))) + return E_OUTOFMEMORY; + + (*dst)->ConditionType = src->ConditionType; + break; + + case ConditionType_Property: + { + struct UiaPropertyCondition *prop_cond = heap_alloc_zero(sizeof(*prop_cond)); + struct UiaPropertyCondition *src_cond = (struct UiaPropertyCondition *)src; + + if (!prop_cond) + return E_OUTOFMEMORY; + + *dst = (struct UiaCondition *)prop_cond; + prop_cond->ConditionType = ConditionType_Property; + prop_cond->PropertyId = src_cond->PropertyId; + prop_cond->Flags = src_cond->Flags; + VariantInit(&prop_cond->Value); + hr = VariantCopy(&prop_cond->Value, &src_cond->Value); + break; + } + + case ConditionType_Not: + { + struct UiaNotCondition *not_cond = heap_alloc_zero(sizeof(*not_cond)); + struct UiaNotCondition *src_cond = (struct UiaNotCondition *)src; + + if (!not_cond) + return E_OUTOFMEMORY; + + *dst = (struct UiaCondition *)not_cond; + not_cond->ConditionType = ConditionType_Not; + hr = uia_condition_clone(¬_cond->pConditions, src_cond->pConditions); + break; + } + + case ConditionType_And: + case ConditionType_Or: + { + struct UiaAndOrCondition *and_or_cond = heap_alloc_zero(sizeof(*and_or_cond)); + struct UiaAndOrCondition *src_cond = (struct UiaAndOrCondition *)src; + int i; + + if (!and_or_cond) + return E_OUTOFMEMORY; + + *dst = (struct UiaCondition *)and_or_cond; + and_or_cond->ConditionType = src_cond->ConditionType; + and_or_cond->ppConditions = heap_alloc_zero(sizeof(*and_or_cond->ppConditions) * src_cond->cConditions); + if (!and_or_cond->ppConditions) + { + hr = E_OUTOFMEMORY; + goto exit; + } + + and_or_cond->cConditions = src_cond->cConditions; + for (i = 0; i < src_cond->cConditions; i++) + { + hr = uia_condition_clone(&and_or_cond->ppConditions[i], src_cond->ppConditions[i]); + if (FAILED(hr)) + goto exit; + } + + break; + } + + default: + WARN("Tried to clone condition with invalid type %d\n", src->ConditionType); + return E_INVALIDARG; + } + +exit: + if (FAILED(hr)) + { + uia_condition_destroy(*dst); + *dst = NULL; + } + + return hr; +} + /* * UiaCacheRequest cloning functions. */ void uia_cache_request_destroy(struct UiaCacheRequest *cache_req) { + uia_condition_destroy(cache_req->pViewCondition); heap_free(cache_req->pProperties); heap_free(cache_req->pPatterns); } HRESULT uia_cache_request_clone(struct UiaCacheRequest *dst, struct UiaCacheRequest *src) { - FIXME("Cache request condition cloning currently unimplemented\n"); + HRESULT hr; + + hr = uia_condition_clone(&dst->pViewCondition, src->pViewCondition); + if (FAILED(hr)) + return hr; dst->Scope = src->Scope; dst->automationElementMode = src->automationElementMode;
1
0
0
0
Connor McAdams : uiautomationcore: Clone UiaCacheRequest structure passed to UiaAddEvent.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: 1518851b72e14690c8c6d608d5284a956231a947 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1518851b72e14690c8c6d608d5284a…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed May 17 16:12:45 2023 -0400 uiautomationcore: Clone UiaCacheRequest structure passed to UiaAddEvent. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/uia_event.c | 5 +++++ dlls/uiautomationcore/uia_private.h | 3 +++ dlls/uiautomationcore/uia_utils.c | 42 +++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/dlls/uiautomationcore/uia_event.c b/dlls/uiautomationcore/uia_event.c index 0a864ea0e95..8169bacc294 100644 --- a/dlls/uiautomationcore/uia_event.c +++ b/dlls/uiautomationcore/uia_event.c @@ -194,6 +194,7 @@ static ULONG WINAPI uia_event_Release(IWineUiaEvent *iface) assert(!event->event_map_entry); SafeArrayDestroy(event->runtime_id); + uia_cache_request_destroy(&event->cache_req); for (i = 0; i < event->event_advisers_count; i++) IWineUiaEventAdviser_Release(event->event_advisers[i]); heap_free(event->event_advisers); @@ -457,6 +458,10 @@ HRESULT WINAPI UiaAddEvent(HUIANODE huianode, EVENTID event_id, UiaEventCallback return hr; } + hr = uia_cache_request_clone(&event->cache_req, cache_req); + if (FAILED(hr)) + goto exit; + hr = attach_event_to_uia_node(huianode, event); if (FAILED(hr)) goto exit; diff --git a/dlls/uiautomationcore/uia_private.h b/dlls/uiautomationcore/uia_private.h index 67fa9febba7..26e70948c07 100644 --- a/dlls/uiautomationcore/uia_private.h +++ b/dlls/uiautomationcore/uia_private.h @@ -110,6 +110,7 @@ struct uia_event struct uia_event_map_entry *event_map_entry; LONG event_defunct; + struct UiaCacheRequest cache_req; UiaEventCallback *cback; }; @@ -186,6 +187,8 @@ HRESULT create_msaa_provider(IAccessible *acc, long child_id, HWND hwnd, BOOL kn HRESULT register_interface_in_git(IUnknown *iface, REFIID riid, DWORD *ret_cookie) DECLSPEC_HIDDEN; HRESULT unregister_interface_in_git(DWORD git_cookie) DECLSPEC_HIDDEN; HRESULT get_interface_in_git(REFIID riid, DWORD git_cookie, IUnknown **ret_iface) DECLSPEC_HIDDEN; +void uia_cache_request_destroy(struct UiaCacheRequest *cache_req) DECLSPEC_HIDDEN; +HRESULT uia_cache_request_clone(struct UiaCacheRequest *dst, struct UiaCacheRequest *src) DECLSPEC_HIDDEN; HRESULT get_safearray_dim_bounds(SAFEARRAY *sa, UINT dim, LONG *lbound, LONG *elems) DECLSPEC_HIDDEN; HRESULT get_safearray_bounds(SAFEARRAY *sa, LONG *lbound, LONG *elems) DECLSPEC_HIDDEN; int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type) DECLSPEC_HIDDEN; diff --git a/dlls/uiautomationcore/uia_utils.c b/dlls/uiautomationcore/uia_utils.c index ef7cf5ff9d2..03416418cce 100644 --- a/dlls/uiautomationcore/uia_utils.c +++ b/dlls/uiautomationcore/uia_utils.c @@ -98,6 +98,48 @@ HRESULT get_interface_in_git(REFIID riid, DWORD git_cookie, IUnknown **ret_iface return S_OK; } +/* + * UiaCacheRequest cloning functions. + */ +void uia_cache_request_destroy(struct UiaCacheRequest *cache_req) +{ + heap_free(cache_req->pProperties); + heap_free(cache_req->pPatterns); +} + +HRESULT uia_cache_request_clone(struct UiaCacheRequest *dst, struct UiaCacheRequest *src) +{ + FIXME("Cache request condition cloning currently unimplemented\n"); + + dst->Scope = src->Scope; + dst->automationElementMode = src->automationElementMode; + if (src->cProperties) + { + if (!(dst->pProperties = heap_alloc_zero(sizeof(*dst->pProperties) * src->cProperties))) + { + uia_cache_request_destroy(dst); + return E_OUTOFMEMORY; + } + + dst->cProperties = src->cProperties; + memcpy(dst->pProperties, src->pProperties, sizeof(*dst->pProperties) * dst->cProperties); + } + + if (src->cPatterns) + { + if (!(dst->pPatterns = heap_alloc_zero(sizeof(*dst->pPatterns) * src->cPatterns))) + { + uia_cache_request_destroy(dst); + return E_OUTOFMEMORY; + } + + dst->cPatterns = src->cPatterns; + memcpy(dst->pPatterns, src->pPatterns, sizeof(*dst->pPatterns) * dst->cPatterns); + } + + return S_OK; +} + HRESULT get_safearray_dim_bounds(SAFEARRAY *sa, UINT dim, LONG *lbound, LONG *elems) { LONG ubound;
1
0
0
0
Connor McAdams : uiautomationcore: Store all events in an event list.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: 8c41311a2b72765b5a184a074e4aa33a6d44d404 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8c41311a2b72765b5a184a074e4aa3…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Fri Jun 9 12:07:06 2023 -0400 uiautomationcore: Store all events in an event list. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/uia_event.c | 145 +++++++++++++++++++++++++++++++++++- dlls/uiautomationcore/uia_private.h | 4 + 2 files changed, 148 insertions(+), 1 deletion(-) diff --git a/dlls/uiautomationcore/uia_event.c b/dlls/uiautomationcore/uia_event.c index 7fd4eda8ead..0a864ea0e95 100644 --- a/dlls/uiautomationcore/uia_event.c +++ b/dlls/uiautomationcore/uia_event.c @@ -19,9 +19,135 @@ #include "uia_private.h" #include "wine/debug.h" +#include "wine/rbtree.h" +#include "assert.h" WINE_DEFAULT_DEBUG_CHANNEL(uiautomation); +/* + * UI Automation event map. + */ +static struct uia_event_map +{ + struct rb_tree event_map; + LONG event_count; +} uia_event_map; + +struct uia_event_map_entry +{ + struct rb_entry entry; + LONG refs; + + int event_id; + + /* + * List of registered events for this event ID. Events are only removed + * from the list when the event map entry reference count hits 0 and the + * entry is destroyed. This avoids dealing with mid-list removal while + * iterating over the list when an event is raised. Rather than remove + * an event from the list, we mark an event as being defunct so it is + * ignored. + */ + struct list events_list; +}; + +static CRITICAL_SECTION event_map_cs; +static CRITICAL_SECTION_DEBUG event_map_cs_debug = +{ + 0, 0, &event_map_cs, + { &event_map_cs_debug.ProcessLocksList, &event_map_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": event_map_cs") } +}; +static CRITICAL_SECTION event_map_cs = { &event_map_cs_debug, -1, 0, 0, 0, 0 }; + +static int uia_event_map_id_compare(const void *key, const struct rb_entry *entry) +{ + struct uia_event_map_entry *event_entry = RB_ENTRY_VALUE(entry, struct uia_event_map_entry, entry); + int event_id = *((int *)key); + + return (event_entry->event_id > event_id) - (event_entry->event_id < event_id); +} + +static struct uia_event_map_entry *uia_get_event_map_entry_for_event(int event_id) +{ + struct uia_event_map_entry *map_entry = NULL; + struct rb_entry *rb_entry; + + if (uia_event_map.event_count && (rb_entry = rb_get(&uia_event_map.event_map, &event_id))) + map_entry = RB_ENTRY_VALUE(rb_entry, struct uia_event_map_entry, entry); + + return map_entry; +} + +static HRESULT uia_event_map_add_event(struct uia_event *event) +{ + struct uia_event_map_entry *event_entry; + + EnterCriticalSection(&event_map_cs); + + if (!(event_entry = uia_get_event_map_entry_for_event(event->event_id))) + { + if (!(event_entry = heap_alloc_zero(sizeof(*event_entry)))) + { + LeaveCriticalSection(&event_map_cs); + return E_OUTOFMEMORY; + } + + event_entry->event_id = event->event_id; + list_init(&event_entry->events_list); + + if (!uia_event_map.event_count) + rb_init(&uia_event_map.event_map, uia_event_map_id_compare); + rb_put(&uia_event_map.event_map, &event->event_id, &event_entry->entry); + uia_event_map.event_count++; + } + + IWineUiaEvent_AddRef(&event->IWineUiaEvent_iface); + list_add_head(&event_entry->events_list, &event->event_list_entry); + InterlockedIncrement(&event_entry->refs); + + event->event_map_entry = event_entry; + LeaveCriticalSection(&event_map_cs); + + return S_OK; +} + +static void uia_event_map_entry_release(struct uia_event_map_entry *entry) +{ + ULONG ref = InterlockedDecrement(&entry->refs); + + if (!ref) + { + struct list *cursor, *cursor2; + + EnterCriticalSection(&event_map_cs); + + /* + * Someone grabbed this while we were waiting to enter the CS, abort + * destruction. + */ + if (InterlockedCompareExchange(&entry->refs, 0, 0) != 0) + { + LeaveCriticalSection(&event_map_cs); + return; + } + + rb_remove(&uia_event_map.event_map, &entry->entry); + uia_event_map.event_count--; + LeaveCriticalSection(&event_map_cs); + + /* Release all events in the list. */ + LIST_FOR_EACH_SAFE(cursor, cursor2, &entry->events_list) + { + struct uia_event *event = LIST_ENTRY(cursor, struct uia_event, event_list_entry); + + IWineUiaEvent_Release(&event->IWineUiaEvent_iface); + } + + heap_free(entry); + } +} + /* * IWineUiaEvent interface. */ @@ -61,6 +187,12 @@ static ULONG WINAPI uia_event_Release(IWineUiaEvent *iface) { int i; + /* + * If this event has an event_map_entry, it should've been released + * before hitting a reference count of 0. + */ + assert(!event->event_map_entry); + SafeArrayDestroy(event->runtime_id); for (i = 0; i < event->event_advisers_count; i++) IWineUiaEventAdviser_Release(event->event_advisers[i]); @@ -86,9 +218,16 @@ static HRESULT WINAPI uia_event_advise_events(IWineUiaEvent *iface, BOOL advise_ return hr; } - /* Once we've advised of removal, no need to keep the advisers around. */ + /* + * Once we've advised of removal, no need to keep the advisers around. + * We can also release our reference to the event map. + */ if (!advise_added) { + InterlockedIncrement(&event->event_defunct); + uia_event_map_entry_release(event->event_map_entry); + event->event_map_entry = NULL; + for (i = 0; i < event->event_advisers_count; i++) IWineUiaEventAdviser_Release(event->event_advisers[i]); heap_free(event->event_advisers); @@ -326,6 +465,10 @@ HRESULT WINAPI UiaAddEvent(HUIANODE huianode, EVENTID event_id, UiaEventCallback if (FAILED(hr)) goto exit; + hr = uia_event_map_add_event(event); + if (FAILED(hr)) + goto exit; + *huiaevent = (HUIAEVENT)event; exit: diff --git a/dlls/uiautomationcore/uia_private.h b/dlls/uiautomationcore/uia_private.h index bd5ca714b94..67fa9febba7 100644 --- a/dlls/uiautomationcore/uia_private.h +++ b/dlls/uiautomationcore/uia_private.h @@ -106,6 +106,10 @@ struct uia_event int event_advisers_count; SIZE_T event_advisers_arr_size; + struct list event_list_entry; + struct uia_event_map_entry *event_map_entry; + LONG event_defunct; + UiaEventCallback *cback; };
1
0
0
0
Fabian Maurer : wineps.drv: Use afm FamilyName instead of FullName.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: 9b12065fc5b04d661b97f63586e2b43f25afcfd8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9b12065fc5b04d661b97f63586e2b4…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sat Jun 10 00:43:03 2023 +0200 wineps.drv: Use afm FamilyName instead of FullName. Fixes a regression introduced by a6cb10bba2d05ceca6ba5b1411c450d38defdbb4 The old logic also used FamilyName, and some applications depend on that Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54993
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54980
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> --- dlls/wineps.drv/init.c | 6 +++--- dlls/wineps.drv/unixlib.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index 7119e9d4f2d..8537ba287d1 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -206,7 +206,7 @@ static BOOL convert_afm_to_ntf(void) off = size; metrics_size = sizeof(IFIMETRICS) + - (wcslen(afmle->afm->FullName) + 1) * sizeof(WCHAR); + (wcslen(afmle->afm->FamilyName) + 1) * sizeof(WCHAR); list = (void *)(data + header->font_mtx_off + sizeof(*list) * count); list->name_off = off + sizeof(*font_mtx); list->size = sizeof(*font_mtx) + strlen(afmle->afm->FontName) + 1 + @@ -237,7 +237,7 @@ static BOOL convert_afm_to_ntf(void) strcpy(data + off + font_mtx->glyph_set_name_off, glyph_set_name); metrics = (void *)(data + off + font_mtx->metrics_off); metrics->cjThis = metrics_size; - metrics->dpwszFaceName = sizeof(*metrics); + metrics->dpwszFamilyName = sizeof(*metrics); if (afmle->afm->IsFixedPitch) metrics->jWinPitchAndFamily |= FIXED_PITCH; metrics->usWinWeight = afmle->afm->Weight; @@ -256,7 +256,7 @@ static BOOL convert_afm_to_ntf(void) metrics->rclFontBox.top = afmle->afm->FontBBox.ury; metrics->rclFontBox.right = afmle->afm->FontBBox.urx; metrics->rclFontBox.bottom = afmle->afm->FontBBox.lly; - wcscpy((WCHAR *)((char *)metrics + metrics->dpwszFaceName), afmle->afm->FullName); + wcscpy((WCHAR *)((char *)metrics + metrics->dpwszFamilyName), afmle->afm->FamilyName); width_range = (void *)(data + off + font_mtx->width_off); for (i = 0; i < font_mtx->width_count; i++) { diff --git a/dlls/wineps.drv/unixlib.c b/dlls/wineps.drv/unixlib.c index 575ab49c49b..e9b009b0e87 100644 --- a/dlls/wineps.drv/unixlib.c +++ b/dlls/wineps.drv/unixlib.c @@ -1027,7 +1027,7 @@ static struct font_data *find_builtin_font(const PSDRV_DEVMODE *devmode, cur = find_font_data(installed_font[i].name); if (!cur) continue; - name = (WCHAR *)((char *)cur->metrics + cur->metrics->dpwszFaceName); + name = (WCHAR *)((char *)cur->metrics + cur->metrics->dpwszFamilyName); cur_it = !!(cur->metrics->fsSelection & FM_SEL_ITALIC); cur_bd = !!(cur->metrics->fsSelection & FM_SEL_BOLD); @@ -1084,7 +1084,7 @@ static BOOL select_builtin_font(PSDRV_PDEVICE *pdev, HFONT hfont, LOGFONTW *plf) font_data = find_builtin_font(pdev->devmode, NULL, it, bd); TRACE("Got family %s font '%s'\n", debugstr_w((WCHAR *)((char *)font_data->metrics + - font_data->metrics->dpwszFaceName)), font_data->name); + font_data->metrics->dpwszFamilyName)), font_data->name); pdev->builtin = TRUE; pdev->font = NULL; @@ -1218,7 +1218,7 @@ static UINT get_font_metric(const struct font_data *font, lf->lfPitchAndFamily = font->metrics->jWinPitchAndFamily & FIXED_PITCH ? FIXED_PITCH : VARIABLE_PITCH; - lstrcpynW(lf->lfFaceName, (WCHAR *)((char *)font->metrics + font->metrics->dpwszFaceName), LF_FACESIZE); + lstrcpynW(lf->lfFaceName, (WCHAR *)((char *)font->metrics + font->metrics->dpwszFamilyName), LF_FACESIZE); return DEVICE_FONTTYPE; } @@ -1253,7 +1253,7 @@ static BOOL enum_fonts(PHYSDEV dev, LPLOGFONTW plf, font_enum_proc proc, LPARAM cur = find_font_data(installed_font[i].name); if (!cur) continue; - name = (WCHAR *)((char *)cur->metrics + cur->metrics->dpwszFaceName); + name = (WCHAR *)((char *)cur->metrics + cur->metrics->dpwszFamilyName); if (wcsncmp(plf->lfFaceName, name, wcslen(name))) continue; @@ -1272,7 +1272,7 @@ static BOOL enum_fonts(PHYSDEV dev, LPLOGFONTW plf, font_enum_proc proc, LPARAM cur = find_font_data(installed_font[i].name); if (!cur) continue; - name = (WCHAR *)((char *)cur->metrics + cur->metrics->dpwszFaceName); + name = (WCHAR *)((char *)cur->metrics + cur->metrics->dpwszFamilyName); TRACE("Got '%s'\n", cur->name); fm = get_font_metric(cur, &tm, &lf); if (!(ret = (*proc)(&lf.elfLogFont, (TEXTMETRICW *)&tm, fm, lp)))
1
0
0
0
Tatsuyuki Ishi : win32u: Cleanup naming and log messages for QueryDisplayConfig.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: d24dcb1ec56ffed7da36f13805678e024c6f4fc2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d24dcb1ec56ffed7da36f13805678e…
Author: Tatsuyuki Ishi <ishitatsuyuki(a)gmail.com> Date: Sun Jun 11 12:22:29 2023 +0900 win32u: Cleanup naming and log messages for QueryDisplayConfig. Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki(a)gmail.com> --- dlls/win32u/sysparams.c | 51 +++++++++++++++++++++++++------------------------ include/ntuser.h | 6 +++--- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 416b3f34de6..a8d9a4f9a10 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -2239,7 +2239,7 @@ static void set_path_target_info( DISPLAYCONFIG_PATH_TARGET_INFO *info, const LU static void set_mode_source_info( DISPLAYCONFIG_MODE_INFO *info, const LUID *gpu_luid, UINT32 source_id, const DEVMODEW *devmode ) { - DISPLAYCONFIG_SOURCE_MODE *mode = &(info->sourceMode); + DISPLAYCONFIG_SOURCE_MODE *mode = &info->sourceMode; info->infoType = DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE; info->adapterId = *gpu_luid; @@ -2268,15 +2268,15 @@ static void set_path_source_info( DISPLAYCONFIG_PATH_SOURCE_INFO *info, const LU info->statusFlags = DISPLAYCONFIG_SOURCE_IN_USE; } -static BOOL source_mode_exists( const DISPLAYCONFIG_MODE_INFO *modeinfo, UINT32 num_modes, +static BOOL source_mode_exists( const DISPLAYCONFIG_MODE_INFO *modes, UINT32 modes_count, UINT32 source_id, UINT32 *found_mode_index ) { UINT32 i; - for (i = 0; i < num_modes; i++) + for (i = 0; i < modes_count; i++) { - if (modeinfo[i].infoType == DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE && - modeinfo[i].id == source_id) + if (modes[i].infoType == DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE && + modes[i].id == source_id) { *found_mode_index = i; return TRUE; @@ -2288,9 +2288,9 @@ static BOOL source_mode_exists( const DISPLAYCONFIG_MODE_INFO *modeinfo, UINT32 /*********************************************************************** * NtUserQueryDisplayConfig (win32u.@) */ -LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DISPLAYCONFIG_PATH_INFO *pathinfo, - UINT32 *numinfoelements, DISPLAYCONFIG_MODE_INFO *modeinfo, - DISPLAYCONFIG_TOPOLOGY_ID *topologyid ) +LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *paths_count, DISPLAYCONFIG_PATH_INFO *paths, + UINT32 *modes_count, DISPLAYCONFIG_MODE_INFO *modes, + DISPLAYCONFIG_TOPOLOGY_ID *topology_id ) { ULONG adapter_index; LONG ret; @@ -2299,12 +2299,13 @@ LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DIS DEVMODEW devmode; struct monitor *monitor; - FIXME( "(%08x %p %p %p %p %p): semi-stub\n", flags, numpathelements, pathinfo, numinfoelements, modeinfo, topologyid ); + FIXME( "flags %#x, paths_count %p, paths %p, modes_count %p, modes %p, topology_id %p semi-stub\n", + flags, paths_count, paths, modes_count, modes, topology_id ); - if (!numpathelements || !numinfoelements) + if (!paths_count || !modes_count) return ERROR_INVALID_PARAMETER; - if (!*numpathelements || !*numinfoelements) + if (!*paths_count || !*modes_count) return ERROR_INVALID_PARAMETER; if (flags != QDC_ALL_PATHS && @@ -2312,17 +2313,17 @@ LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DIS flags != QDC_DATABASE_CURRENT) return ERROR_INVALID_PARAMETER; - if (((flags == QDC_DATABASE_CURRENT) && !topologyid) || - ((flags != QDC_DATABASE_CURRENT) && topologyid)) + if (((flags == QDC_DATABASE_CURRENT) && !topology_id) || + ((flags != QDC_DATABASE_CURRENT) && topology_id)) return ERROR_INVALID_PARAMETER; if (flags != QDC_ONLY_ACTIVE_PATHS) FIXME( "only returning active paths\n" ); - if (topologyid) + if (topology_id) { FIXME( "setting toplogyid to DISPLAYCONFIG_TOPOLOGY_INTERNAL\n" ); - *topologyid = DISPLAYCONFIG_TOPOLOGY_INTERNAL; + *topology_id = DISPLAYCONFIG_TOPOLOGY_INTERNAL; } if (!lock_display_devices()) @@ -2346,18 +2347,18 @@ LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DIS goto done; } - if (path_index == *numpathelements || mode_index == *numinfoelements) + if (path_index == *paths_count || mode_index == *modes_count) { ret = ERROR_INSUFFICIENT_BUFFER; goto done; } - pathinfo[path_index].flags = DISPLAYCONFIG_PATH_ACTIVE; - set_mode_target_info( &modeinfo[mode_index], gpu_luid, output_id, flags, &devmode ); - set_path_target_info( &(pathinfo[path_index].targetInfo), gpu_luid, output_id, mode_index, &devmode ); + paths[path_index].flags = DISPLAYCONFIG_PATH_ACTIVE; + set_mode_target_info( &modes[mode_index], gpu_luid, output_id, flags, &devmode ); + set_path_target_info( &paths[path_index].targetInfo, gpu_luid, output_id, mode_index, &devmode ); mode_index++; - if (mode_index == *numinfoelements) + if (mode_index == *modes_count) { ret = ERROR_INSUFFICIENT_BUFFER; goto done; @@ -2366,18 +2367,18 @@ LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DIS /* Multiple targets can be driven by the same source, ensure a mode * hasn't already been added for this source. */ - if (!source_mode_exists( modeinfo, mode_index, adapter_index, &source_mode_index )) + if (!source_mode_exists( modes, mode_index, adapter_index, &source_mode_index )) { - set_mode_source_info( &modeinfo[mode_index], gpu_luid, adapter_index, &devmode ); + set_mode_source_info( &modes[mode_index], gpu_luid, adapter_index, &devmode ); source_mode_index = mode_index; mode_index++; } - set_path_source_info( &(pathinfo[path_index].sourceInfo), gpu_luid, adapter_index, source_mode_index ); + set_path_source_info( &paths[path_index].sourceInfo, gpu_luid, adapter_index, source_mode_index ); path_index++; } - *numpathelements = path_index; - *numinfoelements = mode_index; + *paths_count = path_index; + *modes_count = mode_index; ret = ERROR_SUCCESS; done: diff --git a/include/ntuser.h b/include/ntuser.h index 50317834084..13c0147f9a4 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -843,9 +843,9 @@ BOOL WINAPI NtUserPerMonitorDPIPhysicalToLogicalPoint( HWND hwnd, POINT *pt ) BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ); BOOL WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam ); BOOL WINAPI NtUserPrintWindow( HWND hwnd, HDC hdc, UINT flags ); -LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *numpathelements, DISPLAYCONFIG_PATH_INFO *pathinfo, - UINT32 *numinfoelements, DISPLAYCONFIG_MODE_INFO *modeinfo, - DISPLAYCONFIG_TOPOLOGY_ID *topologyid); +LONG WINAPI NtUserQueryDisplayConfig( UINT32 flags, UINT32 *paths_count, DISPLAYCONFIG_PATH_INFO *paths, + UINT32 *modes_count, DISPLAYCONFIG_MODE_INFO *modes, + DISPLAYCONFIG_TOPOLOGY_ID *topology_id); UINT_PTR WINAPI NtUserQueryInputContext( HIMC handle, UINT attr ); HWND WINAPI NtUserRealChildWindowFromPoint( HWND parent, LONG x, LONG y ); BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags );
1
0
0
0
Tatsuyuki Ishi : win32u: Move QueryDisplayConfig from user32.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: c2c9112bf8896d49a6af1ca1f73e563c5a7f909c URL:
https://gitlab.winehq.org/wine/wine/-/commit/c2c9112bf8896d49a6af1ca1f73e56…
Author: Tatsuyuki Ishi <ishitatsuyuki(a)gmail.com> Date: Fri Jun 2 19:25:38 2023 +0900 win32u: Move QueryDisplayConfig from user32. Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki(a)gmail.com> --- dlls/user32/sysparams.c | 277 ------------------------------------------------ dlls/user32/user32.spec | 2 +- dlls/win32u/syscall.c | 1 + dlls/win32u/sysparams.c | 224 +++++++++++++++++++++++++++++++++++++++ dlls/win32u/win32u.spec | 2 +- dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 12 +++ include/ntuser.h | 3 + 8 files changed, 243 insertions(+), 279 deletions(-)
1
0
0
0
Rémi Bernon : win32u: Move fullscreen window cursor clipping from winex11.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: af902c188ebaf7d6dda3b628409d8c390ab410d5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/af902c188ebaf7d6dda3b628409d8c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Jun 8 08:51:47 2023 +0200 win32u: Move fullscreen window cursor clipping from winex11. --- dlls/win32u/input.c | 70 ++++++++++++++++++++++++++++++---- dlls/win32u/message.c | 8 +++- dlls/win32u/ntgdi_private.h | 9 ----- dlls/win32u/sysparams.c | 4 ++ dlls/win32u/win32u_private.h | 16 +++++++- dlls/win32u/winstation.c | 13 +++++++ dlls/winex11.drv/desktop.c | 3 -- dlls/winex11.drv/event.c | 6 +-- dlls/winex11.drv/mouse.c | 89 +------------------------------------------- dlls/winex11.drv/window.c | 2 - dlls/winex11.drv/x11drv.h | 4 -- 11 files changed, 103 insertions(+), 121 deletions(-)
1
0
0
0
Rémi Bernon : winex11: Move clip_fullscreen_window foreground check inside it.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: b1d273bba3a5e02d78889e1798d22226d41bc0b7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b1d273bba3a5e02d78889e1798d222…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed May 31 21:15:00 2023 +0200 winex11: Move clip_fullscreen_window foreground check inside it. --- dlls/winex11.drv/event.c | 2 +- dlls/winex11.drv/mouse.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index edb7a1bf983..0e059a94f30 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -782,7 +782,7 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev ) if (use_take_focus) { - if (hwnd == NtUserGetForegroundWindow()) clip_fullscreen_window( hwnd, FALSE ); + clip_fullscreen_window( hwnd, FALSE ); return TRUE; } diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index fd03f03f0dd..00e537cecde 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -500,6 +500,8 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset ) BOOL fullscreen; if (hwnd == NtUserGetDesktopWindow()) return FALSE; + if (hwnd != NtUserGetForegroundWindow()) return FALSE; + style = NtUserGetWindowLongW( hwnd, GWL_STYLE ); if (!(style & WS_VISIBLE)) return FALSE; if ((style & (WS_POPUP | WS_CHILD)) == WS_CHILD) return FALSE; @@ -628,12 +630,8 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU last_cursor_change = input->u.mi.time; } - if (hwnd != NtUserGetDesktopWindow()) - { - hwnd = NtUserGetAncestor( hwnd, GA_ROOT ); - if ((input->u.mi.dwFlags & (MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_RIGHTDOWN)) && hwnd == NtUserGetForegroundWindow()) - clip_fullscreen_window( hwnd, FALSE ); - } + if (input->u.mi.dwFlags & (MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_RIGHTDOWN)) + clip_fullscreen_window( hwnd, FALSE ); /* update the wine server Z-order */
1
0
0
0
Rémi Bernon : win32u: Add a clipping_cursor member to user_thread_info.
by Alexandre Julliard
12 Jun '23
12 Jun '23
Module: wine Branch: master Commit: 3cca65e3283d12d5b61b2ac9b314c36c30a3fa1d URL:
https://gitlab.winehq.org/wine/wine/-/commit/3cca65e3283d12d5b61b2ac9b314c3…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed May 31 18:43:48 2023 +0200 win32u: Add a clipping_cursor member to user_thread_info. --- dlls/win32u/input.c | 9 ++++++++- dlls/win32u/ntuser_private.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 2b951576c57..0dc166986f3 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -404,6 +404,7 @@ static const KBDTABLES kbdus_tables = .fLocaleFlags = MAKELONG(0, KBD_VERSION), }; +static LONG clipping_cursor; /* clipping thread counter */ LONG global_key_state_counter = 0; BOOL grab_pointer = TRUE; @@ -2504,6 +2505,9 @@ BOOL process_wine_clipcursor( BOOL empty, BOOL reset ) TRACE( "empty %u, reset %u\n", empty, reset ); + if (thread_info->clipping_cursor) InterlockedDecrement( &clipping_cursor ); + thread_info->clipping_cursor = FALSE; + if (reset) { thread_info->clipping_reset = NtGetTickCount(); @@ -2514,7 +2518,10 @@ BOOL process_wine_clipcursor( BOOL empty, BOOL reset ) if (empty) return user_driver->pClipCursor( NULL, reset ); get_clip_cursor( &rect ); - return user_driver->pClipCursor( &rect, FALSE ); + if (!user_driver->pClipCursor( &rect, FALSE )) return FALSE; + InterlockedIncrement( &clipping_cursor ); + thread_info->clipping_cursor = TRUE; + return TRUE; } /*********************************************************************** diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index 88e644d2522..b39e38db5d6 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -130,6 +130,7 @@ struct user_thread_info UINT kbd_layout_id; /* Current keyboard layout ID */ struct rawinput_thread_data *rawinput; /* RawInput thread local data / buffer */ UINT spy_indent; /* Current spy indent */ + BOOL clipping_cursor; /* thread is currently clipping */ DWORD clipping_reset; /* time when clipping was last reset */ };
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
64
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Results per page:
10
25
50
100
200