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
August 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
667 discussions
Start a n
N
ew thread
Mohamad Al-Jaf : include: Add IPackageStatics interface definition.
by Alexandre Julliard
17 Aug '23
17 Aug '23
Module: wine Branch: master Commit: fe877fdf8a130e4d3721dc63e6c12ca8bb1787a4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fe877fdf8a130e4d3721dc63e6c12c…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Fri Jan 6 19:11:20 2023 -0500 include: Add IPackageStatics interface definition. --- include/windows.applicationmodel.idl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/windows.applicationmodel.idl b/include/windows.applicationmodel.idl index cea2c9423d8..9514c06a60e 100644 --- a/include/windows.applicationmodel.idl +++ b/include/windows.applicationmodel.idl @@ -93,6 +93,16 @@ namespace Windows.ApplicationModel { [propget] HRESULT Author([out, retval] HSTRING *value); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.ApplicationModel.Package), + uuid(4e534bdf-2960-4878-97a4-9624deb72f2d) + ] + interface IPackageStatics : IInspectable + { + [propget] HRESULT Current([out, retval] Windows.ApplicationModel.Package **value); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), marshaling_behavior(agile), @@ -102,6 +112,14 @@ namespace Windows.ApplicationModel { runtimeclass Package { [default] interface Windows.ApplicationModel.IPackage; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.IPackage2; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.IPackage3; + [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.ApplicationModel.IPackageWithMetadata; + [contract(Windows.Foundation.UniversalApiContract, 3.0)] interface Windows.ApplicationModel.IPackage4; + [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.ApplicationModel.IPackage5; + [contract(Windows.Foundation.UniversalApiContract, 7.0)] interface Windows.ApplicationModel.IPackage6; + [contract(Windows.Foundation.UniversalApiContract, 8.0)] interface Windows.ApplicationModel.IPackage7; + [contract(Windows.Foundation.UniversalApiContract, 10.0)] interface Windows.ApplicationModel.IPackage8; } [
1
0
0
0
Alex Henrie : cmd: Introduce an option_equals helper for WCMD_parse_forf_options.
by Alexandre Julliard
17 Aug '23
17 Aug '23
Module: wine Branch: master Commit: c27f8f72d15195abd4caccd83a2c96a87e7954a4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c27f8f72d15195abd4caccd83a2c96…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Wed Aug 16 20:37:35 2023 -0600 cmd: Introduce an option_equals helper for WCMD_parse_forf_options. --- programs/cmd/builtins.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index badf41c17f6..397eb567277 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1631,6 +1631,19 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, return; } +static BOOL option_equals(WCHAR **haystack, const WCHAR *needle) +{ + int len = wcslen(needle); + + if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, + *haystack, len, needle, len) == CSTR_EQUAL) { + *haystack += len; + return TRUE; + } + + return FALSE; +} + /***************************************************************************** * WCMD_parse_forf_options * @@ -1653,11 +1666,6 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip, WCHAR *pos = options; int len = lstrlenW(pos); - const int eol_len = lstrlenW(L"eol="); - const int skip_len = lstrlenW(L"skip="); - const int tokens_len = lstrlenW(L"tokens="); - const int delims_len = lstrlenW(L"delims="); - const int usebackq_len = lstrlenW(L"usebackq"); /* Initialize to defaults */ lstrcpyW(delims, L" \t"); @@ -1678,36 +1686,28 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip, pos++; /* Save End of line character (Ignore line if first token (based on delims) starts with it) */ - } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - pos, eol_len, L"eol=", eol_len) == CSTR_EQUAL) { - *eol = *(pos + eol_len); - pos = pos + eol_len + 1; + } else if (option_equals(&pos, L"eol=")) { + *eol = *pos++; WINE_TRACE("Found eol as %c(%x)\n", *eol, *eol); /* Save number of lines to skip (Can be in base 10, hex (0x...) or octal (0xx) */ - } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - pos, skip_len, L"skip=", skip_len) == CSTR_EQUAL) { + } else if (option_equals(&pos, L"skip=")) { WCHAR *nextchar = NULL; - pos = pos + skip_len; *skip = wcstoul(pos, &nextchar, 0); WINE_TRACE("Found skip as %d lines\n", *skip); pos = nextchar; /* Save if usebackq semantics are in effect */ - } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, pos, - usebackq_len, L"usebackq", usebackq_len) == CSTR_EQUAL) { + } else if (option_equals(&pos, L"usebackq")) { *usebackq = TRUE; - pos = pos + usebackq_len; WINE_TRACE("Found usebackq\n"); /* Save the supplied delims. Slightly odd as space can be a delimiter but only if you finish the optionsroot string with delims= otherwise the space is just a token delimiter! */ - } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - pos, delims_len, L"delims=", delims_len) == CSTR_EQUAL) { + } else if (option_equals(&pos, L"delims=")) { int i=0; - pos = pos + delims_len; while (*pos && *pos != ' ') { delims[i++] = *pos; pos++; @@ -1717,11 +1717,9 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip, WINE_TRACE("Found delims as '%s'\n", wine_dbgstr_w(delims)); /* Save the tokens being requested */ - } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - pos, tokens_len, L"tokens=", tokens_len) == CSTR_EQUAL) { + } else if (option_equals(&pos, L"tokens=")) { int i=0; - pos = pos + tokens_len; while (*pos && *pos != ' ') { tokens[i++] = *pos; pos++;
1
0
0
0
Alex Henrie : odbccp32: Use CRT allocation functions.
by Alexandre Julliard
17 Aug '23
17 Aug '23
Module: wine Branch: master Commit: 79e78218ec0a1fc13b67b136f19edce1e4d53ccc URL:
https://gitlab.winehq.org/wine/wine/-/commit/79e78218ec0a1fc13b67b136f19edc…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Wed Aug 16 21:49:52 2023 -0600 odbccp32: Use CRT allocation functions. --- dlls/odbccp32/odbccp32.c | 107 +++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 54 deletions(-)
1
0
0
0
Alex Henrie : inetcpl: Use CRT allocation functions.
by Alexandre Julliard
17 Aug '23
17 Aug '23
Module: wine Branch: master Commit: 81a5a8f46b378b0868dd6be4b97ee5d1abfcd75f URL:
https://gitlab.winehq.org/wine/wine/-/commit/81a5a8f46b378b0868dd6be4b97ee5…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Wed Aug 16 21:46:14 2023 -0600 inetcpl: Use CRT allocation functions. --- dlls/inetcpl.cpl/connections.c | 11 +++++------ dlls/inetcpl.cpl/security.c | 13 ++++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dlls/inetcpl.cpl/connections.c b/dlls/inetcpl.cpl/connections.c index a6591051771..842f154bd8c 100644 --- a/dlls/inetcpl.cpl/connections.c +++ b/dlls/inetcpl.cpl/connections.c @@ -27,7 +27,6 @@ #include "inetcpl.h" #include "wine/debug.h" -#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); @@ -83,7 +82,7 @@ static DWORD create_connection_settings(BOOL manual_proxy, const WCHAR *proxy_se pac_url_len = 0; size += sizeof(DWORD)*10; - *ret = heap_alloc_zero(size); + *ret = calloc(1, size); if(!*ret) return 0; (*ret)->version = CONNECTION_SETTINGS_VERSION; @@ -152,11 +151,11 @@ static void connections_on_initdialog(HWND hwnd) while((res = RegQueryValueExW(con, L"DefaultConnectionSettings", NULL, &type, (BYTE*)settings, &size)) == ERROR_MORE_DATA || !settings) { - connection_settings *new_settings = heap_realloc(settings, size); + connection_settings *new_settings = realloc(settings, size); if(!new_settings) { RegCloseKey(con); - heap_free(settings); + free(settings); return; } settings = new_settings; @@ -170,7 +169,7 @@ static void connections_on_initdialog(HWND hwnd) else if(settings->flags & CONNECTION_SETTINGS_WPAD) CheckDlgButton(hwnd, IDC_USE_WPAD, BST_CHECKED); } - heap_free(settings); + free(settings); } TRACE("ProxyEnable = %lx\n", enabled); @@ -332,7 +331,7 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam) res = RegSetValueExW(con, L"DefaultConnectionSettings", 0, REG_BINARY, (BYTE*)default_connection, size); - heap_free(default_connection); + free(default_connection); RegCloseKey(con); return !res; } diff --git a/dlls/inetcpl.cpl/security.c b/dlls/inetcpl.cpl/security.c index a6e8c03d505..05c6502043c 100644 --- a/dlls/inetcpl.cpl/security.c +++ b/dlls/inetcpl.cpl/security.c @@ -37,7 +37,6 @@ #include "inetcpl.h" #include "wine/debug.h" -#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(inetcpl); @@ -273,8 +272,8 @@ static INT_PTR security_on_destroy(secdlg_data * sd) { TRACE("(%p)\n", sd); - heap_free(sd->zone_attr); - heap_free(sd->zones); + free(sd->zone_attr); + free(sd->zones); if (sd->himages) { SendMessageW(sd->hlv, LVM_SETIMAGELIST, LVSIL_NORMAL, 0); ImageList_Destroy(sd->himages); @@ -282,7 +281,7 @@ static INT_PTR security_on_destroy(secdlg_data * sd) security_cleanup_zones(sd); SetWindowLongPtrW(sd->hsec, DWLP_USER, 0); - heap_free(sd); + free(sd); return TRUE; } @@ -300,7 +299,7 @@ static INT_PTR security_on_initdialog(HWND hsec) DWORD lv_index = 0; DWORD i; - sd = heap_alloc_zero(sizeof(secdlg_data)); + sd = calloc(1, sizeof(secdlg_data)); SetWindowLongPtrW(hsec, DWLP_USER, (LONG_PTR) sd); if (!sd) { return FALSE; @@ -338,14 +337,14 @@ static INT_PTR security_on_initdialog(HWND hsec) TRACE("found %ld zones\n", sd->num_zones); /* remember ZONEATTRIBUTES for a listview entry */ - sd->zone_attr = heap_alloc(sizeof(ZONEATTRIBUTES) * sd->num_zones); + sd->zone_attr = calloc(sd->num_zones, sizeof(ZONEATTRIBUTES)); if (!sd->zone_attr) { security_on_destroy(sd); return FALSE; } /* remember zone number and current security level for a listview entry */ - sd->zones = heap_alloc((sizeof(DWORD) + sizeof(DWORD)) * sd->num_zones); + sd->zones = calloc(sd->num_zones, sizeof(DWORD) + sizeof(DWORD)); if (!sd->zones) { security_on_destroy(sd); return FALSE;
1
0
0
0
Alex Henrie : adsldp: Use CRT allocation functions.
by Alexandre Julliard
17 Aug '23
17 Aug '23
Module: wine Branch: master Commit: 64d9d63fecb87c9dcfe14539c68bcf9b999c1072 URL:
https://gitlab.winehq.org/wine/wine/-/commit/64d9d63fecb87c9dcfe14539c68bcf…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Wed Aug 16 21:04:49 2023 -0600 adsldp: Use CRT allocation functions. --- dlls/adsldp/adsldp_private.h | 4 +--- dlls/adsldp/schema.c | 23 ++++++++++------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/dlls/adsldp/adsldp_private.h b/dlls/adsldp/adsldp_private.h index 5d8b8177a7b..73bf8f379fd 100644 --- a/dlls/adsldp/adsldp_private.h +++ b/dlls/adsldp/adsldp_private.h @@ -19,8 +19,6 @@ #ifndef _ADSLDP_PRIVATE_H #define _ADSLDP_PRIVATE_H -#include "wine/heap.h" - static inline LPWSTR strnUtoW( LPCSTR str, DWORD inlen, DWORD *outlen ) { LPWSTR ret = NULL; @@ -28,7 +26,7 @@ static inline LPWSTR strnUtoW( LPCSTR str, DWORD inlen, DWORD *outlen ) if (str) { DWORD len = MultiByteToWideChar( CP_UTF8, 0, str, inlen, NULL, 0 ); - if ((ret = heap_alloc( (len + 1) * sizeof(WCHAR) ))) + if ((ret = malloc( (len + 1) * sizeof(WCHAR) ))) { MultiByteToWideChar( CP_UTF8, 0, str, inlen, ret, len ); ret[len] = 0; diff --git a/dlls/adsldp/schema.c b/dlls/adsldp/schema.c index 7a530cc57e3..d8d0d7e9cde 100644 --- a/dlls/adsldp/schema.c +++ b/dlls/adsldp/schema.c @@ -116,9 +116,9 @@ ADSTYPEENUM get_schema_type(const WCHAR *name, const struct attribute_type *at, static void free_attribute_type(struct attribute_type *at) { - heap_free(at->oid); - heap_free(at->name); - heap_free(at->syntax); + free(at->oid); + free(at->name); + free(at->syntax); } void free_attribute_types(struct attribute_type *at, ULONG count) @@ -128,7 +128,7 @@ void free_attribute_types(struct attribute_type *at, ULONG count) for (i = 0; i < count; i++) free_attribute_type(&at[i]); - heap_free(at); + free(at); } static BOOL is_space(WCHAR c) @@ -156,7 +156,7 @@ static WCHAR *parse_oid(WCHAR **str) } count = end - p; - oid = heap_alloc((count + 1) * sizeof(WCHAR)); + oid = malloc((count + 1) * sizeof(WCHAR)); if (!oid) return NULL; memcpy(oid, p, count * sizeof(WCHAR)); @@ -202,17 +202,14 @@ static WCHAR *parse_name(WCHAR **str, ULONG *name_count) count = wcslen(tmp_name); - if (!name) - new_name = heap_alloc((count + 1) * sizeof(WCHAR)); - else - new_name = heap_realloc(name, (total_count + count + 1) * sizeof(WCHAR)); + new_name = realloc(name, (total_count + count + 1) * sizeof(WCHAR)); if (!new_name) break; memcpy(new_name + total_count, tmp_name, (count + 1) * sizeof(WCHAR)); name = new_name; - heap_free(tmp_name); + free(tmp_name); total_count += count + 1; *name_count += 1; @@ -221,7 +218,7 @@ static WCHAR *parse_name(WCHAR **str, ULONG *name_count) *str = *p ? p + 1 : p; - heap_free(name); + free(name); return NULL; } @@ -236,7 +233,7 @@ static WCHAR *parse_name(WCHAR **str, ULONG *name_count) if (!end) return NULL; count = end - p; - name = heap_alloc((count + 1) * sizeof(WCHAR)); + name = malloc((count + 1) * sizeof(WCHAR)); if (!name) return NULL; memcpy(name, p, count * sizeof(WCHAR)); @@ -400,7 +397,7 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_single_count, ULONG *at_m { ULONG i, total = ldap_count_valuesW(types); - at = heap_alloc(total * sizeof(*at)); + at = malloc(total * sizeof(*at)); if (!at) goto exit; for (i = 0; i < total; i++)
1
0
0
0
Alex Henrie : advapi32: Use CRT allocation functions.
by Alexandre Julliard
17 Aug '23
17 Aug '23
Module: wine Branch: master Commit: 7abcc31298567fbf7a1fb10047b8c625cd1d52bc URL:
https://gitlab.winehq.org/wine/wine/-/commit/7abcc31298567fbf7a1fb10047b8c6…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Wed Aug 16 21:22:54 2023 -0600 advapi32: Use CRT allocation functions. --- dlls/advapi32/advapi.c | 6 +-- dlls/advapi32/advapi32_misc.h | 3 +- dlls/advapi32/cred.c | 110 +++++++++++++++++++++--------------------- dlls/advapi32/eventlog.c | 18 +++---- dlls/advapi32/lsa.c | 60 +++++++++++------------ dlls/advapi32/security.c | 96 ++++++++++++++++++------------------ dlls/advapi32/service.c | 32 ++++++------ 7 files changed, 162 insertions(+), 163 deletions(-)
1
0
0
0
Tim Clem : winemac.drv: Support cooperative app activation in macOS 14 Sonoma.
by Alexandre Julliard
16 Aug '23
16 Aug '23
Module: wine Branch: master Commit: fd67d678503ec2e57cbefef0bdfda48938153d3b URL:
https://gitlab.winehq.org/wine/wine/-/commit/fd67d678503ec2e57cbefef0bdfda4…
Author: Tim Clem <tclem(a)codeweavers.com> Date: Tue Aug 15 11:38:43 2023 -0700 winemac.drv: Support cooperative app activation in macOS 14 Sonoma. Starting in Sonoma, apps can no longer force themselves to the foreground with -activateIgnoringOtherApps:. winemac currently does that in a few places - when an app creates its first window, and in the implementation of APIs like SetFocus. There's nothing we can do to work around the new behavior in the general case. This patch makes Wine apps running in the same prefix yield to one another, so that windows from multiple EXEs can at least behave as intended. --- dlls/winemac.drv/cocoa_app.h | 1 + dlls/winemac.drv/cocoa_app.m | 121 +++++++++++++++++++++++++++++++++++++++- dlls/winemac.drv/cocoa_window.m | 7 ++- 3 files changed, 125 insertions(+), 4 deletions(-) diff --git a/dlls/winemac.drv/cocoa_app.h b/dlls/winemac.drv/cocoa_app.h index 52c91c0621f..c4c8bbd16f2 100644 --- a/dlls/winemac.drv/cocoa_app.h +++ b/dlls/winemac.drv/cocoa_app.h @@ -142,6 +142,7 @@ enum { + (WineApplicationController*) sharedController; - (void) transformProcessToForeground:(BOOL)activateIfTransformed; + - (void) tryToActivateIgnoringOtherApps:(BOOL)ignore; - (BOOL) registerEventQueue:(WineEventQueue*)queue; - (void) unregisterEventQueue:(WineEventQueue*)queue; diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 6a16d1ba832..5a6a3e01005 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -34,6 +34,12 @@ static NSString* const WineAppWaitQueryResponseMode = @"WineAppWaitQueryResponse static NSString* const NSWindowWillStartDraggingNotification = @"NSWindowWillStartDraggingNotification"; static NSString* const NSWindowDidEndDraggingNotification = @"NSWindowDidEndDraggingNotification"; +// Internal distributed notification to handle cooperative app activation in Sonoma. +static NSString* const WineAppWillActivateNotification = @"WineAppWillActivateNotification"; +static NSString* const WineActivatingAppPIDKey = @"ActivatingAppPID"; +static NSString* const WineActivatingAppPrefixKey = @"ActivatingAppPrefix"; +static NSString* const WineActivatingAppConfigDirKey = @"ActivatingAppConfigDir"; + int macdrv_err_on; @@ -47,6 +53,24 @@ int macdrv_err_on; #endif +#if !defined(MAC_OS_VERSION_14_0) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_14_0 +@interface NSApplication (CooperativeActivationSelectorsForOldSDKs) + + - (void)activate; + - (void)yieldActivationToApplication:(NSRunningApplication *)application; + - (void)yieldActivationToApplicationWithBundleIdentifier:(NSString *)bundleIdentifier; + +@end + +@interface NSRunningApplication (CooperativeActivationSelectorsForOldSDKs) + + - (BOOL)activateFromApplication:(NSRunningApplication *)application + options:(NSApplicationActivationOptions)options; + +@end +#endif + + /*********************************************************************** * WineLocalizedString * @@ -227,7 +251,7 @@ static NSString* WineLocalizedString(unsigned int stringID) [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; if (activateIfTransformed) - [NSApp activateIgnoringOtherApps:YES]; + [self tryToActivateIgnoringOtherApps:YES]; #if defined(MAC_OS_X_VERSION_10_9) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 if (!enable_app_nap && [NSProcessInfo instancesRespondToSelector:@selector(beginActivityWithOptions:reason:)]) @@ -1939,8 +1963,103 @@ static NSString* WineLocalizedString(unsigned int stringID) selector:@selector(enabledKeyboardInputSourcesChanged) name:(NSString*)kTISNotifyEnabledKeyboardInputSourcesChanged object:nil]; + + if ([NSApplication instancesRespondToSelector:@selector(yieldActivationToApplication:)]) + { + /* App activation cooperation, starting in macOS 14 Sonoma. */ + [dnc addObserver:self + selector:@selector(otherWineAppWillActivate:) + name:WineAppWillActivateNotification + object:nil + suspensionBehavior:NSNotificationSuspensionBehaviorDeliverImmediately]; + } + } + + - (void) otherWineAppWillActivate:(NSNotification *)note + { + NSProcessInfo *ourProcess; + pid_t otherPID; + NSString *ourConfigDir, *otherConfigDir, *ourPrefix, *otherPrefix; + NSRunningApplication *otherApp; + + /* No point in yielding if we're not the foreground app. */ + if (![NSApp isActive]) return; + + /* Ignore requests from ourself, dead processes, and other prefixes. */ + ourProcess = [NSProcessInfo processInfo]; + otherPID = [note.userInfo[WineActivatingAppPIDKey] integerValue]; + if (otherPID == ourProcess.processIdentifier) return; + + otherApp = [NSRunningApplication runningApplicationWithProcessIdentifier:otherPID]; + if (!otherApp) return; + + ourConfigDir = ourProcess.environment[@"WINECONFIGDIR"]; + otherConfigDir = note.userInfo[WineActivatingAppConfigDirKey]; + if (ourConfigDir.length && otherConfigDir.length && + ![ourConfigDir isEqualToString:otherConfigDir]) + { + return; + } + + ourPrefix = ourProcess.environment[@"WINEPREFIX"]; + otherPrefix = note.userInfo[WineActivatingAppPrefixKey]; + if (ourPrefix.length && otherPrefix.length && + ![ourPrefix isEqualToString:otherPrefix]) + { + return; + } + + /* There's a race condition here. The requesting app sends out + WineAppWillActivateNotification and then activates itself, but since + distributed notifications are asynchronous, we may not have yielded + in time. So we call activateFromApplication: on the other app here, + which will work around that race if it happened. If we didn't hit the + race, the activateFromApplication: call will be a no-op. */ + + /* We only add this observer if NSApplication responds to the yield + methods, so they're safe to call without checking here. */ + [NSApp yieldActivationToApplication:otherApp]; + [otherApp activateFromApplication:[NSRunningApplication currentApplication] + options:0]; } + - (void) tryToActivateIgnoringOtherApps:(BOOL)ignore + { + NSProcessInfo *processInfo; + NSString *configDir, *prefix; + NSDictionary *userInfo; + + if ([NSApp isActive]) return; /* Nothing to do. */ + + if (!ignore || + ![NSApplication instancesRespondToSelector:@selector(yieldActivationToApplication:)]) + { + /* Either we don't need to force activation, or the OS is old enough + that this is our only option. */ + [NSApp activateIgnoringOtherApps:ignore]; + return; + } + + /* Ask other Wine apps to yield activation to us. */ + processInfo = [NSProcessInfo processInfo]; + configDir = processInfo.environment[@"WINECONFIGDIR"]; + prefix = processInfo.environment[@"WINEPREFIX"]; + userInfo = @{ + WineActivatingAppPIDKey: @(processInfo.processIdentifier), + WineActivatingAppPrefixKey: prefix ? prefix : @"", + WineActivatingAppConfigDirKey: configDir ? configDir : @"" + }; + + [[NSDistributedNotificationCenter defaultCenter] + postNotificationName:WineAppWillActivateNotification + object:nil + userInfo:userInfo + deliverImmediately:YES]; + + /* This is racy. See the note in otherWineAppWillActivate:. */ + [NSApp activate]; + } + - (BOOL) inputSourceIsInputMethod { if (!inputSourceIsInputMethodValid) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index ac4cc214239..cc9a9e13c2b 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -1720,7 +1720,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi wasVisible = [self isVisible]; if (activate) - [NSApp activateIgnoringOtherApps:YES]; + [controller tryToActivateIgnoringOtherApps:YES]; NSDisableScreenUpdates(); @@ -2084,8 +2084,9 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi { if (activate) { - [[WineApplicationController sharedController] transformProcessToForeground:YES]; - [NSApp activateIgnoringOtherApps:YES]; + WineApplicationController *controller = [WineApplicationController sharedController]; + [controller transformProcessToForeground:YES]; + [controller tryToActivateIgnoringOtherApps:YES]; } causing_becomeKeyWindow = self;
1
0
0
0
Jacek Caban : cscript: Build as CUI application.
by Alexandre Julliard
16 Aug '23
16 Aug '23
Module: wine Branch: master Commit: a1d429dabde73689c66a5434d6f92284503b8f7a URL:
https://gitlab.winehq.org/wine/wine/-/commit/a1d429dabde73689c66a5434d6f922…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 16 16:08:12 2023 +0200 cscript: Build as CUI application. --- programs/cscript/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/cscript/Makefile.in b/programs/cscript/Makefile.in index d87a28fcc54..7d3e74768f3 100644 --- a/programs/cscript/Makefile.in +++ b/programs/cscript/Makefile.in @@ -3,7 +3,7 @@ IMPORTS = uuid shell32 oleaut32 ole32 user32 advapi32 EXTRADEFS = -DCSCRIPT_BUILD PARENTSRC = ../wscript -EXTRADLLFLAGS = -mwindows -municode +EXTRADLLFLAGS = -mconsole -municode C_SRCS = \ arguments.c \
1
0
0
0
Ziqing Hui : winegstreamer: Implement GetStreamSinkById for media sink.
by Alexandre Julliard
16 Aug '23
16 Aug '23
Module: wine Branch: master Commit: a7594900ea9d0ee1fae864175848e23673c7881a URL:
https://gitlab.winehq.org/wine/wine/-/commit/a7594900ea9d0ee1fae864175848e2…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Fri Aug 11 11:41:34 2023 +0800 winegstreamer: Implement GetStreamSinkById for media sink. --- dlls/winegstreamer/media_sink.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/media_sink.c b/dlls/winegstreamer/media_sink.c index 4418a82096c..fcea67eb8f1 100644 --- a/dlls/winegstreamer/media_sink.c +++ b/dlls/winegstreamer/media_sink.c @@ -671,9 +671,27 @@ static HRESULT WINAPI media_sink_GetStreamSinkByIndex(IMFFinalizableMediaSink *i static HRESULT WINAPI media_sink_GetStreamSinkById(IMFFinalizableMediaSink *iface, DWORD stream_sink_id, IMFStreamSink **stream) { - FIXME("iface %p, stream_sink_id %#lx, stream %p stub!\n", iface, stream_sink_id, stream); + struct media_sink *media_sink = impl_from_IMFFinalizableMediaSink(iface); + struct stream_sink *stream_sink; + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, stream_sink_id %#lx, stream %p.\n", iface, stream_sink_id, stream); + + if (!stream) + return E_POINTER; + + EnterCriticalSection(&media_sink->cs); + + hr = MF_E_INVALIDSTREAMNUMBER; + if ((stream_sink = media_sink_get_stream_sink_by_id(media_sink, stream_sink_id))) + { + IMFStreamSink_AddRef((*stream = &stream_sink->IMFStreamSink_iface)); + hr = S_OK; + } + + LeaveCriticalSection(&media_sink->cs); + + return hr; } static HRESULT WINAPI media_sink_SetPresentationClock(IMFFinalizableMediaSink *iface, IMFPresentationClock *clock)
1
0
0
0
Ziqing Hui : winegstreamer: Implement GetStreamSinkByIndex for media sink.
by Alexandre Julliard
16 Aug '23
16 Aug '23
Module: wine Branch: master Commit: 59adbf66708e61553881da32b35334de6e50fc2e URL:
https://gitlab.winehq.org/wine/wine/-/commit/59adbf66708e61553881da32b35334…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Fri Aug 11 11:33:27 2023 +0800 winegstreamer: Implement GetStreamSinkByIndex for media sink. --- dlls/winegstreamer/media_sink.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/media_sink.c b/dlls/winegstreamer/media_sink.c index 54a1c839758..4418a82096c 100644 --- a/dlls/winegstreamer/media_sink.c +++ b/dlls/winegstreamer/media_sink.c @@ -641,9 +641,31 @@ static HRESULT WINAPI media_sink_GetStreamSinkCount(IMFFinalizableMediaSink *ifa static HRESULT WINAPI media_sink_GetStreamSinkByIndex(IMFFinalizableMediaSink *iface, DWORD index, IMFStreamSink **stream) { - FIXME("iface %p, index %lu, stream %p stub!\n", iface, index, stream); + struct media_sink *media_sink = impl_from_IMFFinalizableMediaSink(iface); + struct stream_sink *stream_sink; + HRESULT hr = MF_E_INVALIDINDEX; + DWORD entry_index = 0; - return E_NOTIMPL; + TRACE("iface %p, index %lu, stream %p stub!\n", iface, index, stream); + + if (!stream) + return E_POINTER; + + EnterCriticalSection(&media_sink->cs); + + LIST_FOR_EACH_ENTRY(stream_sink, &media_sink->stream_sinks, struct stream_sink, entry) + { + if (entry_index++ == index) + { + IMFStreamSink_AddRef((*stream = &stream_sink->IMFStreamSink_iface)); + hr = S_OK; + break; + } + } + + LeaveCriticalSection(&media_sink->cs); + + return hr; } static HRESULT WINAPI media_sink_GetStreamSinkById(IMFFinalizableMediaSink *iface, DWORD stream_sink_id,
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
67
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
Results per page:
10
25
50
100
200