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
October 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
702 discussions
Start a n
N
ew thread
Connor McAdams : uiautomationcore: Introduce uia_event_for_each function for iterating through registered events.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: b9cf4e989676a6f35b75c5ad41311196b17d5da3 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b9cf4e989676a6f35b75c5ad413111…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Thu Sep 14 11:57:31 2023 -0400 uiautomationcore: Introduce uia_event_for_each function for iterating through registered events. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/uia_event.c | 141 +++++++++++++++++++++++--------------- 1 file changed, 85 insertions(+), 56 deletions(-) diff --git a/dlls/uiautomationcore/uia_event.c b/dlls/uiautomationcore/uia_event.c index 96b6ac448aa..d493ab0a243 100644 --- a/dlls/uiautomationcore/uia_event.c +++ b/dlls/uiautomationcore/uia_event.c @@ -252,6 +252,51 @@ static void uia_event_map_entry_release(struct uia_event_map_entry *entry) } } +typedef HRESULT UiaWineEventForEachCallback(struct uia_event *, void *); +static HRESULT uia_event_for_each(int event_id, UiaWineEventForEachCallback *callback, void *user_data, + BOOL clientside_only) +{ + struct uia_event_map_entry *event_entry; + HRESULT hr = S_OK; + int i; + + EnterCriticalSection(&event_map_cs); + if ((event_entry = uia_get_event_map_entry_for_event(event_id))) + InterlockedIncrement(&event_entry->refs); + LeaveCriticalSection(&event_map_cs); + + if (!event_entry) + return S_OK; + + for (i = 0; i < 2; i++) + { + struct list *events = !i ? &event_entry->events_list : &event_entry->serverside_events_list; + struct list *cursor, *cursor2; + + if (i && clientside_only) + break; + + LIST_FOR_EACH_SAFE(cursor, cursor2, events) + { + struct uia_event *event = LIST_ENTRY(cursor, struct uia_event, event_list_entry); + + /* Event is no longer valid. */ + if (InterlockedCompareExchange(&event->event_defunct, 0, 0) != 0) + continue; + + hr = callback(event, user_data); + if (FAILED(hr)) + goto exit; + } + } + +exit: + if (FAILED(hr)) + WARN("Event callback failed with hr %#lx\n", hr); + uia_event_map_entry_release(event_entry); + return hr; +} + /* * Functions for struct uia_event_args, a reference counted structure * used to store event arguments. This is necessary for serverside events @@ -1525,73 +1570,57 @@ static HRESULT uia_event_check_match(HUIANODE node, HUIANODE nav_start_node, SAF return hr; } -static HRESULT uia_raise_event(IRawElementProviderSimple *elprov, struct uia_event_args *args) +struct uia_elprov_event_data { - struct uia_event_map_entry *event_entry; - enum ProviderOptions prov_opts = 0; - struct list *cursor, *cursor2; - HUIANODE node; - SAFEARRAY *sa; - HRESULT hr; - - hr = IRawElementProviderSimple_get_ProviderOptions(elprov, &prov_opts); - if (FAILED(hr)) - return hr; + IRawElementProviderSimple *elprov; + struct uia_event_args *args; + BOOL clientside_only; - EnterCriticalSection(&event_map_cs); - if ((event_entry = uia_get_event_map_entry_for_event(args->simple_args.EventId))) - InterlockedIncrement(&event_entry->refs); - LeaveCriticalSection(&event_map_cs); + SAFEARRAY *rt_id; + HUIANODE node; +}; - if (!event_entry) - return S_OK; +static HRESULT uia_raise_elprov_event_callback(struct uia_event *event, void *data) +{ + struct uia_elprov_event_data *event_data = (struct uia_elprov_event_data *)data; + HRESULT hr; - /* - * For events raised on server-side providers, we don't want to add any - * clientside HWND providers. - */ - if (prov_opts & ProviderOptions_ServerSideProvider) - hr = create_uia_node_from_elprov(elprov, &node, FALSE); - else - hr = create_uia_node_from_elprov(elprov, &node, TRUE); - if (FAILED(hr)) + if (!event_data->node) { - uia_event_map_entry_release(event_entry); - return hr; - } + /* + * For events raised on server-side providers, we don't want to add any + * clientside HWND providers. + */ + hr = create_uia_node_from_elprov(event_data->elprov, &event_data->node, event_data->clientside_only); + if (FAILED(hr)) + return hr; - hr = UiaGetRuntimeId(node, &sa); - if (FAILED(hr)) - { - uia_event_map_entry_release(event_entry); - UiaNodeRelease(node); - return hr; + hr = UiaGetRuntimeId(event_data->node, &event_data->rt_id); + if (FAILED(hr)) + return hr; } - LIST_FOR_EACH_SAFE(cursor, cursor2, &event_entry->events_list) - { - struct uia_event *event = LIST_ENTRY(cursor, struct uia_event, event_list_entry); + return uia_event_check_match(event_data->node, event_data->node, event_data->rt_id, event_data->args, event); +} - hr = uia_event_check_match(node, node, sa, args, event); - if (FAILED(hr)) - break; - } +static HRESULT uia_raise_elprov_event(IRawElementProviderSimple *elprov, struct uia_event_args *args) +{ + struct uia_elprov_event_data event_data = { elprov, args }; + enum ProviderOptions prov_opts = 0; + HRESULT hr; - if (prov_opts & ProviderOptions_ServerSideProvider) - { - LIST_FOR_EACH_SAFE(cursor, cursor2, &event_entry->serverside_events_list) - { - struct uia_event *event = LIST_ENTRY(cursor, struct uia_event, event_list_entry); + hr = IRawElementProviderSimple_get_ProviderOptions(elprov, &prov_opts); + if (FAILED(hr)) + return hr; - hr = uia_event_check_match(node, node, sa, args, event); - if (FAILED(hr)) - break; - } - } + event_data.clientside_only = !(prov_opts & ProviderOptions_ServerSideProvider); + hr = uia_event_for_each(args->simple_args.EventId, uia_raise_elprov_event_callback, (void *)&event_data, + event_data.clientside_only); + if (FAILED(hr)) + WARN("uia_event_for_each failed with hr %#lx\n", hr); - uia_event_map_entry_release(event_entry); - SafeArrayDestroy(sa); - UiaNodeRelease(node); + UiaNodeRelease(event_data.node); + SafeArrayDestroy(event_data.rt_id); return hr; } @@ -1624,7 +1653,7 @@ HRESULT WINAPI UiaRaiseAutomationEvent(IRawElementProviderSimple *elprov, EVENTI if (!args) return E_OUTOFMEMORY; - hr = uia_raise_event(elprov, args); + hr = uia_raise_elprov_event(elprov, args); uia_event_args_release(args); if (FAILED(hr)) return hr;
1
0
0
0
Connor McAdams : uiautomationcore/tests: Add another test for IProxyProviderWinEventHandler child HWND scope checking.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: 75b4419478c8fd497f6cf46fb8cf31395b3af972 URL:
https://gitlab.winehq.org/wine/wine/-/commit/75b4419478c8fd497f6cf46fb8cf31…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Sep 27 10:00:32 2023 -0400 uiautomationcore/tests: Add another test for IProxyProviderWinEventHandler child HWND scope checking. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- dlls/uiautomationcore/tests/uiautomation.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/dlls/uiautomationcore/tests/uiautomation.c b/dlls/uiautomationcore/tests/uiautomation.c index 98990d3b19c..0e623c9a2bf 100644 --- a/dlls/uiautomationcore/tests/uiautomation.c +++ b/dlls/uiautomationcore/tests/uiautomation.c @@ -16757,9 +16757,9 @@ static DWORD WINAPI uia_proxy_provider_win_event_handler_test_thread(LPVOID para AutomationElementMode_Full }; HWND hwnd[2] = { ((HWND *)param)[0], ((HWND *)param)[1] }; struct node_provider_desc exp_node_desc; + HWND tmp_hwnd, tmp_hwnd2; HUIAEVENT event, event2; HANDLE event_handles[2]; - HWND tmp_hwnd; HUIANODE node; HRESULT hr; int i; @@ -16953,6 +16953,31 @@ static DWORD WINAPI uia_proxy_provider_win_event_handler_test_thread(LPVOID para todo_wine CHECK_CALLED_AT_LEAST(child_winproc_GETOBJECT_UiaRoot, 2); check_uia_hwnd_expects_at_least(0, FALSE, 2, TRUE, 2, TRUE, 2, TRUE, 0, FALSE); + /* + * Raise a WinEvent on a descendant HWND of our test HWND. If any ancestor + * in the parent chain of HWNDs up to the root HWND is within scope, this + * WinEvent is within scope. + */ + tmp_hwnd = CreateWindowA("ProxyProviderWinEventHandler test child class", "Test child window 2", WS_CHILD, + 0, 0, 50, 50, hwnd[1], NULL, NULL, NULL); + tmp_hwnd2 = CreateWindowA("ProxyProviderWinEventHandler test child class", "Test child window 3", WS_CHILD, + 0, 0, 50, 50, tmp_hwnd, NULL, NULL, NULL); + set_provider_win_event_handler_win_event_expects(&Provider_nc3, EVENT_OBJECT_FOCUS, tmp_hwnd2, OBJID_WINDOW, CHILDID_SELF); + set_provider_win_event_handler_win_event_expects(&Provider_hwnd3, EVENT_OBJECT_FOCUS, tmp_hwnd2, OBJID_WINDOW, CHILDID_SELF); + Provider_nc3.hwnd = Provider_hwnd3.hwnd = tmp_hwnd2; + + set_uia_hwnd_expects(0, 2, 2, 0, 0); + SET_EXPECT_MULTI(child_winproc_GETOBJECT_UiaRoot, 12); /* Only sent 12 times on Win11. */ + test_uia_event_win_event_mapping(EVENT_OBJECT_FOCUS, tmp_hwnd2, OBJID_WINDOW, CHILDID_SELF, event_handles, + ARRAY_SIZE(event_handles), TRUE, TRUE, TRUE); + todo_wine CHECK_CALLED_AT_LEAST(child_winproc_GETOBJECT_UiaRoot, 2); + check_uia_hwnd_expects_at_least(0, FALSE, 2, TRUE, 2, TRUE, 0, FALSE, 0, FALSE); + + DestroyWindow(tmp_hwnd); + Provider_nc3.hwnd = Provider_hwnd3.hwnd = hwnd[1]; + set_provider_win_event_handler_win_event_expects(&Provider_nc3, EVENT_OBJECT_FOCUS, hwnd[1], OBJID_WINDOW, CHILDID_SELF); + set_provider_win_event_handler_win_event_expects(&Provider_hwnd3, EVENT_OBJECT_FOCUS, hwnd[1], OBJID_WINDOW, CHILDID_SELF); + hr = UiaRemoveEvent(event); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
1
0
0
0
Eric Pouech : msvfw32: Correctly store internal pointer.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: 19d38debc948a77173d38746ad32333fb5d24c0a URL:
https://gitlab.winehq.org/wine/wine/-/commit/19d38debc948a77173d38746ad3233…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Mon Oct 2 12:26:10 2023 +0200 msvfw32: Correctly store internal pointer. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55696
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/msvfw32/mciwnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvfw32/mciwnd.c b/dlls/msvfw32/mciwnd.c index 9e475fdafcb..c71e4fe5567 100644 --- a/dlls/msvfw32/mciwnd.c +++ b/dlls/msvfw32/mciwnd.c @@ -257,7 +257,7 @@ static LRESULT MCIWND_Create(HWND hWnd, LPCREATESTRUCTW cs) mwi = calloc(1, sizeof(*mwi)); if (!mwi) return -1; - SetWindowLongW(hWnd, 0, (LPARAM)mwi); + SetWindowLongPtrW(hWnd, 0, (LPARAM)mwi); mwi->dwStyle = cs->style; /* There is no need to show stats if there is no caption */
1
0
0
0
Eric Pouech : winemac.drv: Use NtCallbackReturn to send back app's icons to unixlib.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: 67b10761ec3b0d9a81d91d2590caa1158622ff1a URL:
https://gitlab.winehq.org/wine/wine/-/commit/67b10761ec3b0d9a81d91d2590caa1…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Sat Sep 30 10:00:17 2023 +0200 winemac.drv: Use NtCallbackReturn to send back app's icons to unixlib. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55658
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/winemac.drv/dllmain.c | 16 ++++++++-------- dlls/winemac.drv/image.c | 22 ++++++++++++++-------- dlls/winemac.drv/unixlib.h | 12 ------------ 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/dlls/winemac.drv/dllmain.c b/dlls/winemac.drv/dllmain.c index b20f8d71dc9..8812426cc44 100644 --- a/dlls/winemac.drv/dllmain.c +++ b/dlls/winemac.drv/dllmain.c @@ -243,16 +243,16 @@ static BOOL CALLBACK get_first_resource(HMODULE module, LPCWSTR type, LPWSTR nam */ static NTSTATUS WINAPI macdrv_app_icon(void *arg, ULONG size) { - struct app_icon_params *params = arg; - struct app_icon_result *result = param_ptr(params->result); + struct app_icon_entry entries[64]; HRSRC res_info; HGLOBAL res_data; GRPICONDIR *icon_dir; + unsigned count; int i; TRACE("()\n"); - result->count = 0; + count = 0; res_info = NULL; EnumResourceNamesW(NULL, (LPCWSTR)RT_GROUP_ICON, get_first_resource, (LONG_PTR)&res_info); @@ -274,9 +274,9 @@ static NTSTATUS WINAPI macdrv_app_icon(void *arg, ULONG size) goto cleanup; } - for (i = 0; i < icon_dir->idCount && result->count < ARRAYSIZE(result->entries); i++) + for (i = 0; i < icon_dir->idCount && count < ARRAYSIZE(entries); i++) { - struct app_icon_entry *entry = &result->entries[result->count]; + struct app_icon_entry *entry = &entries[count]; int width = icon_dir->idEntries[i].bWidth; int height = icon_dir->idEntries[i].bHeight; BOOL found_better_bpp = FALSE; @@ -338,7 +338,7 @@ static NTSTATUS WINAPI macdrv_app_icon(void *arg, ULONG size) { entry->png = (UINT_PTR)icon_bits; entry->icon = 0; - result->count++; + count++; } else { @@ -348,7 +348,7 @@ static NTSTATUS WINAPI macdrv_app_icon(void *arg, ULONG size) { entry->icon = HandleToUlong(icon); entry->png = 0; - result->count++; + count++; } else WARN("failed to create icon %d from resource with ID %hd\n", i, icon_dir->idEntries[i].nID); @@ -363,7 +363,7 @@ static NTSTATUS WINAPI macdrv_app_icon(void *arg, ULONG size) cleanup: FreeResource(res_data); - return 0; + return NtCallbackReturn(entries, count * sizeof(entries[0]), 0); } typedef NTSTATUS (WINAPI *kernel_callback)(void *params, ULONG size); diff --git a/dlls/winemac.drv/image.c b/dlls/winemac.drv/image.c index 857684db9c2..6e2fcf1eaa2 100644 --- a/dlls/winemac.drv/image.c +++ b/dlls/winemac.drv/image.c @@ -249,27 +249,33 @@ cleanup: */ CFArrayRef create_app_icon_images(void) { - struct app_icon_result icons; - struct app_icon_params params = { .result = (UINT_PTR)&icons }; CFMutableArrayRef images = NULL; + struct app_icon_entry *entries; + ULONG ret_len; + unsigned count; int i; TRACE("()\n"); - macdrv_client_func(client_func_app_icon, ¶ms, sizeof(params)); - - if (!icons.count) return NULL; + if (KeUserModeCallback(client_func_app_icon, NULL, 0, (void**)&entries, &ret_len) || + (ret_len % sizeof(*entries))) + { + WARN("incorrect callback result\n"); + return NULL; + } + count = ret_len / sizeof(*entries); + if (!count || !entries) return NULL; - images = CFArrayCreateMutable(NULL, icons.count, &kCFTypeArrayCallBacks); + images = CFArrayCreateMutable(NULL, count, &kCFTypeArrayCallBacks); if (!images) { WARN("failed to create images array\n"); return NULL; } - for (i = 0; i < icons.count; i++) + for (i = 0; i < count; i++) { - struct app_icon_entry *icon = &icons.entries[i]; + struct app_icon_entry *icon = &entries[i]; CGImageRef cgimage = NULL; if (icon->png) diff --git a/dlls/winemac.drv/unixlib.h b/dlls/winemac.drv/unixlib.h index 61f4f44fb75..7f14517a8ee 100644 --- a/dlls/winemac.drv/unixlib.h +++ b/dlls/winemac.drv/unixlib.h @@ -104,18 +104,6 @@ struct app_icon_entry UINT64 png; }; -struct app_icon_result -{ - UINT32 count; - struct app_icon_entry entries[64]; -}; - -/* macdrv_app_icon params */ -struct app_icon_params -{ - UINT64 result; /* FIXME: Use NtCallbackReturn instead */ -}; - /* macdrv_app_quit_request params */ struct app_quit_request_params {
1
0
0
0
Piotr Caban : gdi32: Pass default DEVMODE to winspool in CreateDC.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: b4b39bfbd1ac160bc7d7899ae9976bc45902b523 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b4b39bfbd1ac160bc7d7899ae9976b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sun Oct 1 13:04:56 2023 +0200 gdi32: Pass default DEVMODE to winspool in CreateDC. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55670
--- dlls/gdi32/dc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 368a38db788..e1f6703f81e 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -235,6 +235,12 @@ static BOOL print_copy_devmode( struct print *print, const DEVMODEW *devmode ) HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, const DEVMODEW *devmode ) { + PRINTER_DEFAULTSW prn_defaults = + { + .pDatatype = NULL, + .pDevMode = (DEVMODEW *)devmode, + .DesiredAccess = PRINTER_ACCESS_USE + }; UNICODE_STRING device_str, output_str; driver_entry_point entry_point = NULL; const WCHAR *display = NULL, *p; @@ -280,7 +286,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, ERR( "no driver found for %s\n", debugstr_w(buf) ); return 0; } - else if (!OpenPrinterW( (WCHAR *)device, &hspool, NULL )) + else if (!OpenPrinterW( (WCHAR *)device, &hspool, &prn_defaults )) { return 0; }
1
0
0
0
Esme Povirk : user32/tests: Print regions in test_hvredraw failure case.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: 338cb1261b0b722ebba8280ad97eef892aeb0fa5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/338cb1261b0b722ebba8280ad97eef…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Sat Sep 30 13:02:39 2023 -0500 user32/tests: Print regions in test_hvredraw failure case. --- dlls/user32/tests/msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 10240b18826..ae0e6f3de56 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -9661,7 +9661,7 @@ static void subtest_hvredraw(HWND hparent, UINT class_style, DWORD style) rgn_ok = EqualRgn( hrgn_expect, hrgn_actual ); ok( !!rgn_ok, "Update region shall match expected region\n" ); - if (!rgn_ok && winetest_debug > 1) + if (!rgn_ok) { trace( "Expected update region: " ); dump_region( hrgn_expect );
1
0
0
0
Piotr Caban : msvcr110: Reset chore task_collection earlier to prevent occasional test failure.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: 5fa6014567a95e7a9f4c5b2759ba60b12feb254a URL:
https://gitlab.winehq.org/wine/wine/-/commit/5fa6014567a95e7a9f4c5b2759ba60…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sun Oct 1 11:00:53 2023 +0200 msvcr110: Reset chore task_collection earlier to prevent occasional test failure. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55686
--- dlls/msvcrt/concurrency.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index fa21a206e79..2af2f3ff917 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -2241,20 +2241,19 @@ static void execute_chore(_UnrealizedChore *chore, static void CALLBACK chore_wrapper_finally(BOOL normal, void *data) { _UnrealizedChore *chore = data; - volatile LONG *ptr; + struct _StructuredTaskCollection *task_collection = chore->task_collection; LONG finished = 1; TRACE("(%u %p)\n", normal, data); - if (!chore->task_collection) + if (!task_collection) return; - ptr = &chore->task_collection->finished; + chore->task_collection = NULL; - if (InterlockedCompareExchange(ptr, 1, FINISHED_INITIAL) != FINISHED_INITIAL) - finished = InterlockedIncrement(ptr); + if (InterlockedCompareExchange(&task_collection->finished, 1, FINISHED_INITIAL) != FINISHED_INITIAL) + finished = InterlockedIncrement(&task_collection->finished); if (!finished) - call_Context_Unblock(chore->task_collection->event); - chore->task_collection = NULL; + call_Context_Unblock(task_collection->event); } static void __cdecl chore_wrapper(_UnrealizedChore *chore)
1
0
0
0
Brendan Shanks : configure: Don't use -Wl,-z,defs if it causes link errors with 'environ'.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: 450c358881dbc6dcfb2692b8f4debb7db8fdc54b URL:
https://gitlab.winehq.org/wine/wine/-/commit/450c358881dbc6dcfb2692b8f4debb…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Fri Sep 29 11:01:20 2023 -0700 configure: Don't use -Wl,-z,defs if it causes link errors with 'environ'. Fixes undefined reference link error in msv1_0 on FreeBSD. Reported by Gerald Pfeifer. --- configure | 30 ++++++++++++++---------------- configure.ac | 10 +++++++++- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 3521432204b..3560893e597 100755 --- a/configure +++ b/configure @@ -10102,34 +10102,32 @@ fi LDDLLFLAGS="-fPIC" ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-z,defs" >&5 -printf %s "checking whether the compiler supports -Wl,-z,defs... " >&6; } -if test ${ac_cv_cflags__Wl__z_defs+y} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wl,-z,defs works correctly" >&5 +printf %s "checking whether -Wl,-z,defs works correctly... " >&6; } +if test ${ac_cv_wl_z_defs+y} then : printf %s "(cached) " >&6 else $as_nop - ac_wine_try_cflags_saved=$CFLAGS -CFLAGS="$CFLAGS -Wl,-z,defs" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $UNIXDLLFLAGS $UNIXLDFLAGS -Wl,-z,defs" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int main(int argc, char **argv) { return 0; } +extern char **environ; char **envp; void myfunc(void) { envp = environ; } _ACEOF if ac_fn_c_try_link "$LINENO" then : - ac_cv_cflags__Wl__z_defs=yes + ac_cv_wl_z_defs=yes else $as_nop - ac_cv_cflags__Wl__z_defs=no + ac_cv_wl_z_defs=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -CFLAGS=$ac_wine_try_cflags_saved -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl__z_defs" >&5 -printf "%s\n" "$ac_cv_cflags__Wl__z_defs" >&6; } -if test "x$ac_cv_cflags__Wl__z_defs" = xyes -then : - UNIXLDFLAGS="$UNIXLDFLAGS -Wl,-z,defs" + CFLAGS=$ac_save_cflags fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wl_z_defs" >&5 +printf "%s\n" "$ac_cv_wl_z_defs" >&6; } + test $ac_cv_wl_z_defs != yes || as_fn_append UNIXLDFLAGS " -Wl,-z,defs" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,--export-dynamic" >&5 printf %s "checking whether the compiler supports -Wl,--export-dynamic... " >&6; } if test ${ac_cv_cflags__Wl___export_dynamic+y} diff --git a/configure.ac b/configure.ac index 7229e25dbed..593982fde6c 100644 --- a/configure.ac +++ b/configure.ac @@ -765,7 +765,15 @@ case $host_os in LDDLLFLAGS="-fPIC" ;; esac - WINE_TRY_CFLAGS([-Wl,-z,defs],[UNIXLDFLAGS="$UNIXLDFLAGS -Wl,-z,defs"]) + AC_CACHE_CHECK([whether -Wl,-z,defs works correctly], ac_cv_wl_z_defs, + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $UNIXDLLFLAGS $UNIXLDFLAGS -Wl,-z,defs" + dnl On FreeBSD, shared libraries using environ fail to link with -Wl,-z,defs + AC_LINK_IFELSE([AC_LANG_SOURCE([[extern char **environ; char **envp; void myfunc(void) { envp = environ; }]])], + [ac_cv_wl_z_defs=yes],[ac_cv_wl_z_defs=no]) + CFLAGS=$ac_save_cflags]) + test $ac_cv_wl_z_defs != yes || AS_VAR_APPEND([UNIXLDFLAGS],[" -Wl,-z,defs"]) + WINE_TRY_CFLAGS([-Wl,--export-dynamic],[WINELOADER_LDFLAGS="-Wl,--export-dynamic"]) WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs"
1
0
0
0
Alexandre Julliard : faudio: Import upstream release 23.10.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: a084fd052885678937648886b78e579ed945831f URL:
https://gitlab.winehq.org/wine/wine/-/commit/a084fd052885678937648886b78e57…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 2 11:54:20 2023 +0200 faudio: Import upstream release 23.10. --- libs/faudio/include/FAudio.h | 2 +- libs/faudio/src/F3DAudio.c | 8 +++++--- libs/faudio/src/FACT_internal.c | 26 +++++++++++++++++++++++--- libs/faudio/src/FAudio_internal_simd.c | 2 +- libs/faudio/src/FAudio_platform_win32.c | 8 ++++---- 5 files changed, 34 insertions(+), 12 deletions(-) diff --git a/libs/faudio/include/FAudio.h b/libs/faudio/include/FAudio.h index 009e93a7fb3..0c75809f79d 100644 --- a/libs/faudio/include/FAudio.h +++ b/libs/faudio/include/FAudio.h @@ -494,7 +494,7 @@ extern FAudioGUID DATAFORMAT_SUBTYPE_IEEE_FLOAT; #define FAUDIO_ABI_VERSION 0 #define FAUDIO_MAJOR_VERSION 23 -#define FAUDIO_MINOR_VERSION 7 +#define FAUDIO_MINOR_VERSION 10 #define FAUDIO_PATCH_VERSION 0 #define FAUDIO_COMPILED_VERSION ( \ diff --git a/libs/faudio/src/F3DAudio.c b/libs/faudio/src/F3DAudio.c index 068bd1facdf..877f184f130 100644 --- a/libs/faudio/src/F3DAudio.c +++ b/libs/faudio/src/F3DAudio.c @@ -1274,7 +1274,7 @@ static inline void CalculateMatrix( } } } - else + else if (curConfig != NULL) { listenerToEmitter = VectorScale(emitterToListener, -1.0f); @@ -1351,8 +1351,10 @@ static inline void CalculateMatrix( } } } - - + } + else + { + FAudio_assert(0 && "Config info not found!"); } /* TODO: add post check to validate values diff --git a/libs/faudio/src/FACT_internal.c b/libs/faudio/src/FACT_internal.c index 22a0f7c04a0..32832fd3270 100644 --- a/libs/faudio/src/FACT_internal.c +++ b/libs/faudio/src/FACT_internal.c @@ -39,6 +39,8 @@ #define FACT_CONTENT_VERSION_3_4 45 #define FACT_CONTENT_VERSION_3_1 44 #define FACT_CONTENT_VERSION_3_0 43 +#define FACT_CONTENT_VERSION_2_4 41 +#define FACT_CONTENT_VERSION_2_0 37 static inline int FACT_INTERNAL_SupportedContent(uint16_t version) { @@ -3105,7 +3107,17 @@ uint32_t FACT_INTERNAL_ParseWaveBank( #define DOSWAP_64(x) x = FAudio_swap64BE(x) fileOffset = offset; - READ(&header, sizeof(header)) + + FAudio_zero(&header, sizeof(header)); + READ(&header.dwSignature, sizeof(header.dwSignature)); + READ(&header.dwVersion, sizeof(header.dwVersion)); + if (header.dwVersion > FACT_CONTENT_VERSION_2_4) + { + READ(&header.dwHeaderVersion, sizeof(header.dwHeaderVersion)); + } + + READ(&header.Segments, sizeof(header.Segments)); + se = header.dwSignature == 0x57424E44; if (se) { @@ -3123,12 +3135,20 @@ uint32_t FACT_INTERNAL_ParseWaveBank( return -1; /* TODO: NOT XACT FILE */ } - if (!FACT_INTERNAL_SupportedContent(header.dwVersion)) + /* We support all Wavebank versions - Restore when SoundBank support them also. */ + /*if (!FACT_INTERNAL_SupportedContent(header.dwVersion)) + { + return -2; + } + */ + if ( header.dwVersion < FACT_CONTENT_VERSION_2_4 || + header.dwVersion > FACT_CONTENT_VERSION ) { return -2; } - if (!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion)) + if ( header.dwVersion > FACT_CONTENT_VERSION_2_4 && + !FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion) ) { return -3; } diff --git a/libs/faudio/src/FAudio_internal_simd.c b/libs/faudio/src/FAudio_internal_simd.c index 21dcd143c4e..71fc281074f 100644 --- a/libs/faudio/src/FAudio_internal_simd.c +++ b/libs/faudio/src/FAudio_internal_simd.c @@ -48,7 +48,7 @@ /* AArch64 guarantees NEON. */ #define NEED_SCALAR_CONVERTER_FALLBACKS 0 -#elif __MACOSX__ +#elif __MACOSX__ && !defined(__POWERPC__) /* Some build systems may need to specify this. */ #if !defined(__SSE2__) && !defined(__ARM_NEON__) #error macOS does not have SSE2/NEON? Bad compiler? diff --git a/libs/faudio/src/FAudio_platform_win32.c b/libs/faudio/src/FAudio_platform_win32.c index 8ed9cde1c7d..d3ded665df9 100644 --- a/libs/faudio/src/FAudio_platform_win32.c +++ b/libs/faudio/src/FAudio_platform_win32.c @@ -444,8 +444,8 @@ uint32_t FAudio_PlatformGetDeviceDetails( hr = IMMDevice_GetId(device, &str); FAudio_assert(!FAILED(hr) && "Failed to get audio endpoint id!"); - lstrcpynW(details->DeviceID, str, ARRAYSIZE(details->DeviceID) - 1); - lstrcpynW(details->DisplayName, str, ARRAYSIZE(details->DisplayName) - 1); + lstrcpynW((WCHAR *)details->DeviceID, str, ARRAYSIZE(details->DeviceID) - 1); + lstrcpynW((WCHAR *)details->DisplayName, str, ARRAYSIZE(details->DisplayName) - 1); CoTaskMemFree(str); hr = IMMDevice_Activate( @@ -739,7 +739,7 @@ FAudioIOStream* FAudio_memopen(void *mem, int len) uint8_t* FAudio_memptr(FAudioIOStream *io, size_t offset) { struct FAudio_mem *memio = io->data; - return memio->mem + offset; + return (uint8_t *)memio->mem + offset; } void FAudio_close(FAudioIOStream *io) @@ -896,7 +896,7 @@ FAUDIOAPI float XNA_PlaySong(const char *name) IMFAttributes *attributes = NULL; IMFMediaType *media_type = NULL; UINT32 channels, samplerate; - UINT64 duration; + INT64 duration; PROPVARIANT var; HRESULT hr; WCHAR filename_w[MAX_PATH];
1
0
0
0
Alexandre Julliard : ldap: Import upstream release 2.5.16.
by Alexandre Julliard
02 Oct '23
02 Oct '23
Module: wine Branch: master Commit: b6852f6bed4bbff6b7105acde04d1971256107eb URL:
https://gitlab.winehq.org/wine/wine/-/commit/b6852f6bed4bbff6b7105acde04d19…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Sep 30 13:50:45 2023 +0200 ldap: Import upstream release 2.5.16. --- libs/ldap/libldap/init.c | 6 +++--- libs/ldap/libldap/open.c | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libs/ldap/libldap/init.c b/libs/ldap/libldap/init.c index a94744b8dcf..a289bd4b8cf 100644 --- a/libs/ldap/libldap/init.c +++ b/libs/ldap/libldap/init.c @@ -96,9 +96,9 @@ static const struct ol_attribute { {0, ATTR_OPTION, "URI", NULL, LDAP_OPT_URI}, /* replaces HOST/PORT */ {0, ATTR_OPTION, "SOCKET_BIND_ADDRESSES", NULL, LDAP_OPT_SOCKET_BIND_ADDRESSES}, {0, ATTR_BOOL, "REFERRALS", NULL, LDAP_BOOL_REFERRALS}, - {0, ATTR_INT, "KEEPALIVE_IDLE", NULL, LDAP_OPT_X_KEEPALIVE_IDLE}, - {0, ATTR_INT, "KEEPALIVE_PROBES", NULL, LDAP_OPT_X_KEEPALIVE_PROBES}, - {0, ATTR_INT, "KEEPALIVE_INTERVAL", NULL, LDAP_OPT_X_KEEPALIVE_INTERVAL}, + {0, ATTR_OPT_INT, "KEEPALIVE_IDLE", NULL, LDAP_OPT_X_KEEPALIVE_IDLE}, + {0, ATTR_OPT_INT, "KEEPALIVE_PROBES", NULL, LDAP_OPT_X_KEEPALIVE_PROBES}, + {0, ATTR_OPT_INT, "KEEPALIVE_INTERVAL", NULL, LDAP_OPT_X_KEEPALIVE_INTERVAL}, #if 0 /* This should only be allowed via ldap_set_option(3) */ diff --git a/libs/ldap/libldap/open.c b/libs/ldap/libldap/open.c index db84a74d6ce..6656325a460 100644 --- a/libs/ldap/libldap/open.c +++ b/libs/ldap/libldap/open.c @@ -501,6 +501,11 @@ ldap_int_open_connection( if( proto == LDAP_PROTO_UDP ) return 0; #endif + if ( async && rc == -2) { + /* Need to let the connect complete asynchronously before we continue */ + return -2; + } + #ifdef HAVE_TLS if ((rc == 0 || rc == -2) && ( ld->ld_options.ldo_tls_mode == LDAP_OPT_X_TLS_HARD || strcmp( srv->lud_scheme, "ldaps" ) == 0 )) @@ -585,9 +590,9 @@ ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp ) /* Attach the passed socket as the *LDAP's connection */ c = ldap_new_connection( ld, NULL, 1, 0, NULL, 0, 0 ); if( c == NULL ) { + LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); ldap_unbind_ext( ld, NULL, NULL ); *ldp = NULL; - LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); return( LDAP_NO_MEMORY ); } ber_sockbuf_ctrl( c->lconn_sb, LBER_SB_OPT_SET_FD, fdp );
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
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
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200