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 2021
----- 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
811 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Match native cosf results in -Pi/4 - Pi/4 range.
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: 9008cd2f2437650ad41ce8a8924ed1828ca21889 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9008cd2f2437650ad41ce8a8…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jun 21 16:37:44 2021 +0200 msvcrt: Match native cosf results in -Pi/4 - Pi/4 range. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 949bf12d66b..ecf5fdce4d8 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -680,16 +680,17 @@ static float __sindf(double x) /* Copied from musl: src/math/__cosdf.c */ static float __cosdf(double x) { - static const double C0 = -0x1ffffffd0c5e81.0p-54, - C1 = 0x155553e1053a42.0p-57, - C2 = -0x16c087e80f1e27.0p-62, - C3 = 0x199342e0ee5069.0p-68; - double r, w, z; + static const double C0 = -0x1.0000000000000p-1, + C1 = 0x1.5555555555555p-5, + C2 = -0x1.6c16c16c16c17p-10, + C3 = 0x1.a01a01a01a01ap-16, + C4 = -0x1.27e4fb7789f5cp-22; + double z; z = x * x; - w = z * z; - r = C2 + z * C3; - return ((1.0 + z * C0) + w * C1) + (w * z) * r; + if (x > -7.8163146972656250e-03 && x < 7.8163146972656250e-03) + return 1 + C0 * z; + return 1.0 + z * (C0 + z * (C1 + z * (C2 + z * (C3 + z * C4)))); } static const UINT64 exp2f_T[] = {
1
0
0
0
Piotr Caban : msvcrt: Match native sinf results in -Pi/4 - Pi/4 range.
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: ee7b5ebc3a7843fc2997d5cc5f7784c4d51b4f8d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ee7b5ebc3a7843fc2997d5cc…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jun 21 16:37:36 2021 +0200 msvcrt: Match native sinf results in -Pi/4 - Pi/4 range. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index bf1ed359da6..949bf12d66b 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -660,14 +660,17 @@ static float __expm1f(float x) /* Copied from musl: src/math/__sindf.c */ static float __sindf(double x) { - static const double S1 = -0x15555554cbac77.0p-55, - S2 = 0x111110896efbb2.0p-59, - S3 = -0x1a00f9e2cae774.0p-65, - S4 = 0x16cd878c3b46a7.0p-71; + static const double S1 = -0x1.5555555555555p-3, + S2 = 0x1.1111111111111p-7, + S3 = -0x1.a01a01a01a01ap-13, + S4 = 0x1.71de3a556c734p-19; double r, s, w, z; z = x * x; + if (x > -7.8175831586122513e-03 && x < 7.8175831586122513e-03) + return x * (1 + S1 * z); + w = z * z; r = S3 + z * S4; s = z * x;
1
0
0
0
Akihiro Sagawa : ntdll: Validate directory path when the path name ends with a dos device name.
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: 0acd98f135b246176f33896bdc13ee6cadc3339e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0acd98f135b246176f33896b…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Sat Jun 19 18:25:35 2021 +0900 ntdll: Validate directory path when the path name ends with a dos device name. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51291
Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/path.c | 91 ++++++++++++++++++++++++++++++++++++++++++------- dlls/ntdll/tests/path.c | 2 -- 2 files changed, 78 insertions(+), 15 deletions(-) diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index 4cb64cbe516..cacb95853ad 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -129,6 +129,40 @@ ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name ) return 0; } +/****************************************************************** + * is_valid_directory + * + * Helper for RtlDosPathNameToNtPathName_U_WithStatus. + * Test if the path is an exisiting directory. + */ +static BOOL is_valid_directory(LPCWSTR path) +{ + OBJECT_ATTRIBUTES attr; + UNICODE_STRING ntpath; + IO_STATUS_BLOCK io; + HANDLE handle; + NTSTATUS nts; + + if (!RtlDosPathNameToNtPathName_U(path, &ntpath, NULL, NULL)) + return FALSE; + + attr.Length = sizeof(attr); + attr.RootDirectory = 0; + attr.Attributes = OBJ_CASE_INSENSITIVE; + attr.ObjectName = &ntpath; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + + nts = NtOpenFile(&handle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &io, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT); + RtlFreeUnicodeString(&ntpath); + if (nts != STATUS_SUCCESS) + return FALSE; + NtClose(handle); + return TRUE; +} + /************************************************************************** * RtlDosPathNameToNtPathName_U_WithStatus [NTDLL.@] * @@ -146,9 +180,10 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U { static const WCHAR global_prefix[] = {'\\','\\','?','\\'}; static const WCHAR global_prefix2[] = {'\\','?','?','\\'}; - ULONG sz, offset; + NTSTATUS nts = STATUS_SUCCESS; + ULONG sz, offset, dosdev; WCHAR local[MAX_PATH]; - LPWSTR ptr; + LPWSTR ptr = local; TRACE("(%s,%p,%p,%p)\n", debugstr_w(dos_path), ntpath, file_part, cd); @@ -178,28 +213,57 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U return STATUS_SUCCESS; } - ptr = local; - sz = RtlGetFullPathName_U(dos_path, sizeof(local), ptr, file_part); - if (sz == 0) return STATUS_OBJECT_NAME_INVALID; + dosdev = RtlIsDosDeviceName_U(dos_path); + if ((offset = HIWORD(dosdev))) + { + sz = offset + sizeof(WCHAR); + + if (sz > sizeof(local) && + (!(ptr = RtlAllocateHeap(GetProcessHeap(), 0, sz)))) + return STATUS_NO_MEMORY; + + memcpy(ptr, dos_path, offset); + ptr[offset/sizeof(WCHAR)] = '\0'; + + if (!is_valid_directory(ptr)) + { + nts = STATUS_OBJECT_NAME_INVALID; + goto out; + } + + if (*file_part) *file_part = NULL; - if (sz > sizeof(local)) + sz = LOWORD(dosdev); + + wcscpy(ptr, L"\\\\.\\"); + memcpy(ptr + 4, dos_path + offset / sizeof(WCHAR), sz); + ptr[4 + sz / sizeof(WCHAR)] = '\0'; + sz += 4 * sizeof(WCHAR); + } + else { - if (!(ptr = RtlAllocateHeap(GetProcessHeap(), 0, sz))) return STATUS_NO_MEMORY; - sz = RtlGetFullPathName_U(dos_path, sz, ptr, file_part); + sz = RtlGetFullPathName_U(dos_path, sizeof(local), ptr, file_part); + if (sz == 0) return STATUS_OBJECT_NAME_INVALID; + + if (sz > sizeof(local)) + { + if (!(ptr = RtlAllocateHeap(GetProcessHeap(), 0, sz))) return STATUS_NO_MEMORY; + sz = RtlGetFullPathName_U(dos_path, sz, ptr, file_part); + } } sz += (1 /* NUL */ + 4 /* unc\ */ + 4 /* \??\ */) * sizeof(WCHAR); if (sz > MAXWORD) { - if (ptr != local) RtlFreeHeap(GetProcessHeap(), 0, ptr); - return STATUS_OBJECT_NAME_INVALID; + nts = STATUS_OBJECT_NAME_INVALID; + goto out; } ntpath->MaximumLength = sz; ntpath->Buffer = RtlAllocateHeap(GetProcessHeap(), 0, ntpath->MaximumLength); if (!ntpath->Buffer) { - if (ptr != local) RtlFreeHeap(GetProcessHeap(), 0, ptr); - return STATUS_NO_MEMORY; + nts = STATUS_NO_MEMORY; + goto out; } wcscpy(ntpath->Buffer, L"\\??\\"); @@ -225,8 +289,9 @@ NTSTATUS WINAPI RtlDosPathNameToNtPathName_U_WithStatus(const WCHAR *dos_path, U /* FIXME: cd filling */ +out: if (ptr != local) RtlFreeHeap(GetProcessHeap(), 0, ptr); - return STATUS_SUCCESS; + return nts; } /************************************************************************** diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c index 74ad971392c..dba889fdec7 100644 --- a/dlls/ntdll/tests/path.c +++ b/dlls/ntdll/tests/path.c @@ -571,13 +571,11 @@ static void test_RtlDosPathNameToNtPathName_U(void) winetest_push_context("%s", debugstr_w(error_paths[i])); ret = pRtlDosPathNameToNtPathName_U(error_paths[i], &nameW, &file_part, NULL); - todo_wine_if(i == 3 || i == 4) ok(!ret, "Got %d.\n", ret); if (pRtlDosPathNameToNtPathName_U_WithStatus) { status = pRtlDosPathNameToNtPathName_U_WithStatus(error_paths[i], &nameW, &file_part, NULL); - todo_wine_if(i == 3 || i == 4) ok(status == STATUS_OBJECT_NAME_INVALID || broken(status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */), "Got status %#x.\n", status); }
1
0
0
0
Akihiro Sagawa : ntdll/tests: Expand path name tests with path + device name.
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: 64c4582a40a512181bddd8d7e02f25f343049c7f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=64c4582a40a512181bddd8d7…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Sat Jun 19 18:25:33 2021 +0900 ntdll/tests: Expand path name tests with path + device name. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/path.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c index f2588c0bd98..74ad971392c 100644 --- a/dlls/ntdll/tests/path.c +++ b/dlls/ntdll/tests/path.c @@ -317,6 +317,11 @@ static void test_RtlGetFullPathName_U(void) { "...", "C:\\windows\\", NULL}, { "./foo", "C:\\windows\\foo", "foo"}, { "foo/..", "C:\\windows", "windows"}, + { "\\windows\\nul", "\\\\.\\nul", NULL}, + { "C:\\nonexistent\\nul", "\\\\.\\nul", NULL}, + { "C:\\con\\con", "\\\\.\\con", NULL}, + { "C:NUL.", "\\\\.\\NUL", NULL}, + { "C:NUL", "\\\\.\\NUL", NULL}, { "AUX", "\\\\.\\AUX", NULL}, { "COM1", "\\\\.\\COM1", NULL}, { "?<>*\"|:", "C:\\windows\\?<>*\"|:", "?<>*\"|:"}, @@ -471,6 +476,9 @@ static void test_RtlDosPathNameToNtPathName_U(void) {L"...", L"\\??\\C:\\windows\\", -1}, {L"./foo", L"\\??\\C:\\windows\\foo", 15}, {L"foo/..", L"\\??\\C:\\windows", 7}, + {L"\\windows\\nul", L"\\??\\nul", -1}, + {L"C:NUL.", L"\\??\\NUL", -1}, + {L"C:NUL", L"\\??\\NUL", -1}, {L"AUX" , L"\\??\\AUX", -1}, {L"COM1" , L"\\??\\COM1", -1}, {L"?<>*\"|:", L"\\??\\C:\\windows\\?<>*\"|:", 15}, @@ -551,32 +559,30 @@ static void test_RtlDosPathNameToNtPathName_U(void) {L"cOnOuT$", L"\\??\\cOnOuT$", -1, L"\\??\\C:\\windows\\cOnOuT$" /* winxp */ }, {L"CONERR$", L"\\??\\C:\\windows\\CONERR$", 15}, }; + static const WCHAR *error_paths[] = { + NULL, L"", L" ", L"C:\\nonexistent\\nul", L"C:\\con\\con" + }; GetCurrentDirectoryA(sizeof(curdir), curdir); SetCurrentDirectoryA("C:\\windows\\"); - ret = pRtlDosPathNameToNtPathName_U(NULL, &nameW, &file_part, NULL); - ok(!ret, "Got %d.\n", ret); - - ret = pRtlDosPathNameToNtPathName_U(L"", &nameW, &file_part, NULL); - ok(!ret, "Got %d.\n", ret); - - ret = pRtlDosPathNameToNtPathName_U(L" ", &nameW, &file_part, NULL); - ok(!ret, "Got %d.\n", ret); - - if (pRtlDosPathNameToNtPathName_U_WithStatus) + for (i = 0; i < ARRAY_SIZE(error_paths); ++i) { - status = pRtlDosPathNameToNtPathName_U_WithStatus(NULL, &nameW, &file_part, NULL); - ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */, - "Got status %#x.\n", status); + winetest_push_context("%s", debugstr_w(error_paths[i])); - status = pRtlDosPathNameToNtPathName_U_WithStatus(L"", &nameW, &file_part, NULL); - ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */, - "Got status %#x.\n", status); + ret = pRtlDosPathNameToNtPathName_U(error_paths[i], &nameW, &file_part, NULL); + todo_wine_if(i == 3 || i == 4) + ok(!ret, "Got %d.\n", ret); + + if (pRtlDosPathNameToNtPathName_U_WithStatus) + { + status = pRtlDosPathNameToNtPathName_U_WithStatus(error_paths[i], &nameW, &file_part, NULL); + todo_wine_if(i == 3 || i == 4) + ok(status == STATUS_OBJECT_NAME_INVALID || broken(status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */), + "Got status %#x.\n", status); + } - status = pRtlDosPathNameToNtPathName_U_WithStatus(L" ", &nameW, &file_part, NULL); - ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */, - "Got status %#x.\n", status); + winetest_pop_context(); } for (i = 0; i < ARRAY_SIZE(tests); ++i)
1
0
0
0
Zhiyi Zhang : uxtheme: Check window handle for SetWindowTheme().
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: 3f292a0e6516b7cfe11ccaaadffb05df64bd8ca8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3f292a0e6516b7cfe11ccaaa…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jun 21 17:15:09 2021 +0800 uxtheme: Check window handle for SetWindowTheme(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/system.c | 4 ++++ dlls/uxtheme/tests/system.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 49742c947a0..33e407fdf82 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -690,6 +690,10 @@ HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName, HRESULT hr; TRACE("(%p,%s,%s)\n", hwnd, debugstr_w(pszSubAppName), debugstr_w(pszSubIdList)); + + if (!hwnd) + return E_HANDLE; + hr = UXTHEME_SetWindowProperty(hwnd, atSubAppName, pszSubAppName); if(SUCCEEDED(hr)) hr = UXTHEME_SetWindowProperty(hwnd, atSubIdList, pszSubIdList); diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 7ec72e30259..869dbe2cdc9 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -104,7 +104,6 @@ static void test_SetWindowTheme(void) HWND hWnd; hRes = SetWindowTheme(NULL, NULL, NULL); -todo_wine ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes); /* Only do the bare minimum to get a valid hwnd */
1
0
0
0
Zhiyi Zhang : uxtheme: Check window handle for GetWindowTheme().
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: 16e2a9aecc86c4d01d327506f3b45eee0cae6359 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=16e2a9aecc86c4d01d327506…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jun 21 17:15:02 2021 +0800 uxtheme: Check window handle for GetWindowTheme(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/system.c | 7 +++++++ dlls/uxtheme/tests/system.c | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 1c25f38d5d9..49742c947a0 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -669,6 +669,13 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist) HTHEME WINAPI GetWindowTheme(HWND hwnd) { TRACE("(%p)\n", hwnd); + + if (!hwnd) + { + SetLastError(E_HANDLE); + return NULL; + } + return GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme)); } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index a5d962d17a3..7ec72e30259 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -81,10 +81,7 @@ static void test_GetWindowTheme(void) SetLastError(0xdeadbeef); hTheme = GetWindowTheme(NULL); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_HANDLE, - "Expected E_HANDLE, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", GetLastError() ); /* Only do the bare minimum to get a valid hwnd */ hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL);
1
0
0
0
Zhiyi Zhang : uxtheme: Set last error code for OpenThemeDataEx().
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: f5e56638a7429cd3cbc34e794a99256d7f607d0a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f5e56638a7429cd3cbc34e79…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jun 21 17:14:56 2021 +0800 uxtheme: Set last error code for OpenThemeDataEx(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/system.c | 2 + dlls/uxtheme/tests/system.c | 103 ++++++++++++-------------------------------- 2 files changed, 29 insertions(+), 76 deletions(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index aaef03f0205..1c25f38d5d9 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -642,6 +642,8 @@ HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags) if(IsWindow(hwnd)) SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme); TRACE(" = %p\n", hTheme); + + SetLastError(hTheme ? ERROR_SUCCESS : E_PROP_ID_UNSUPPORTED); return hTheme; } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 3f259d08f79..a5d962d17a3 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -165,28 +165,21 @@ static void test_OpenThemeData(void) SetLastError(0xdeadbeef); hTheme = OpenThemeData(NULL, szInvalidClassList); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + E_PROP_ID_UNSUPPORTED, GetLastError() ); SetLastError(0xdeadbeef); hTheme = OpenThemeData(NULL, szClassList); if (bThemeActive) { ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); } else { ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + E_PROP_ID_UNSUPPORTED, GetLastError() ); } /* Only do the bare minimum to get a valid hdc */ @@ -203,20 +196,16 @@ static void test_OpenThemeData(void) SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szInvalidClassList); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + E_PROP_ID_UNSUPPORTED, GetLastError() ); if (!bThemeActive) { SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szButtonClassList); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + E_PROP_ID_UNSUPPORTED, GetLastError() ); skip("No active theme, skipping rest of OpenThemeData tests\n"); return; } @@ -226,27 +215,18 @@ static void test_OpenThemeData(void) SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szButtonClassList); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); /* Test with bUtToN instead of Button */ SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szButtonClassList2); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); SetLastError(0xdeadbeef); hTheme = OpenThemeData(hWnd, szClassList); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); /* GetWindowTheme should return the last handle opened by OpenThemeData */ SetLastError(0xdeadbeef); @@ -318,28 +298,21 @@ static void test_OpenThemeDataEx(void) SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(NULL, szInvalidClassList, 0); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + E_PROP_ID_UNSUPPORTED, GetLastError() ); SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(NULL, szClassList, 0); if (bThemeActive) { ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); } else { ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + E_PROP_ID_UNSUPPORTED, GetLastError() ); } /* Only do the bare minimum to get a valid hdc */ @@ -356,20 +329,16 @@ static void test_OpenThemeDataEx(void) SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szInvalidClassList, 0); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + E_PROP_ID_UNSUPPORTED, GetLastError() ); if (!bThemeActive) { SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0); ok( hTheme == NULL, "Expected a NULL return, got %p\n", hTheme); - todo_wine - ok( GetLastError() == E_PROP_ID_UNSUPPORTED, - "Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n", + E_PROP_ID_UNSUPPORTED, GetLastError() ); skip("No active theme, skipping rest of OpenThemeDataEx tests\n"); return; } @@ -379,51 +348,33 @@ static void test_OpenThemeDataEx(void) SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, OTD_FORCE_RECT_SIZING); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, OTD_NONCLIENT); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList, 0x3); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); /* Test with bUtToN instead of Button */ SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szButtonClassList2, 0); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); SetLastError(0xdeadbeef); hTheme = pOpenThemeDataEx(hWnd, szClassList, 0); ok( hTheme != NULL, "got NULL, expected a HTHEME handle\n"); - todo_wine - ok( GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got 0x%08x\n", - GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got 0x%08x\n", GetLastError() ); DestroyWindow(hWnd); }
1
0
0
0
Zhiyi Zhang : uxtheme: Fall back to default class if the specified subclass is not found.
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: 3e9fbda43c6d2f5fd10366f520fc93b0b9234dc0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3e9fbda43c6d2f5fd10366f5…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jun 21 17:14:43 2021 +0800 uxtheme: Fall back to default class if the specified subclass is not found. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50113
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/system.c | 4 ++++ dlls/uxtheme/tests/system.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index a37e532500a..aaef03f0205 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -634,6 +634,10 @@ HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags) if (pszUseClassList) hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList); + + /* Fall back to default class if the specified subclass is not found */ + if (!hTheme) + hTheme = MSSTYLES_OpenThemeClass(NULL, pszUseClassList); } if(IsWindow(hwnd)) SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme); diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index ae4de902730..3f259d08f79 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -127,7 +127,7 @@ todo_wine ok(hRes == S_OK, "Expected S_OK, got 0x%08x.\n", hRes); hTheme = OpenThemeData(hWnd, L"Button"); - todo_wine ok(!!hTheme, "OpenThemeData failed.\n"); + ok(!!hTheme, "OpenThemeData failed.\n"); CloseThemeData(hTheme); } else
1
0
0
0
Zhiyi Zhang : uxtheme/tests: Test SetWindowTheme() with a non-existent subclass.
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: 59f3758ecb627000e8fa845d80190a29131096c9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=59f3758ecb627000e8fa845d…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jun 21 17:14:37 2021 +0800 uxtheme/tests: Test SetWindowTheme() with a non-existent subclass. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/tests/system.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 5b6c91dc481..ae4de902730 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -102,6 +102,7 @@ static void test_GetWindowTheme(void) static void test_SetWindowTheme(void) { + HTHEME hTheme; HRESULT hRes; HWND hWnd; @@ -110,12 +111,30 @@ todo_wine ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes); /* Only do the bare minimum to get a valid hwnd */ - hWnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100,0, 0, 0, NULL); + hWnd = CreateWindowExA(0, "button", "test", WS_POPUP, 0, 0, 100, 100, 0, 0, 0, NULL); ok(hWnd != NULL, "Failed to create a test window.\n"); hRes = SetWindowTheme(hWnd, NULL, NULL); ok( hRes == S_OK, "Expected S_OK, got 0x%08x\n", hRes); + if (IsThemeActive()) + { + hTheme = OpenThemeData(hWnd, L"Button"); + ok(!!hTheme, "OpenThemeData failed.\n"); + CloseThemeData(hTheme); + + hRes = SetWindowTheme(hWnd, L"deadbeef", NULL); + ok(hRes == S_OK, "Expected S_OK, got 0x%08x.\n", hRes); + + hTheme = OpenThemeData(hWnd, L"Button"); + todo_wine ok(!!hTheme, "OpenThemeData failed.\n"); + CloseThemeData(hTheme); + } + else + { + skip("No active theme, skipping rest of SetWindowTheme tests.\n"); + } + DestroyWindow(hWnd); }
1
0
0
0
Zhiyi Zhang : winex11.drv: Cache the current mode for detached outputs.
by Alexandre Julliard
21 Jun '21
21 Jun '21
Module: wine Branch: master Commit: 0f820e9c942a3256cf62cd037fb16ea2c45a7ee5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0f820e9c942a3256cf62cd03…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jun 21 17:09:18 2021 +0800 winex11.drv: Cache the current mode for detached outputs. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/xrandr.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index c3af35d8ec3..e3fa7a6e1d6 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -1390,6 +1390,7 @@ static void xrandr14_free_modes( DEVMODEW *modes ) static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode ) { + struct current_mode *mode_ptr = NULL; XRRScreenResources *screen_resources; XRROutputInfo *output_info = NULL; RROutput output = (RROutput)id; @@ -1406,13 +1407,15 @@ static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode ) continue; if (!current_modes[mode_idx].loaded) + { + mode_ptr = ¤t_modes[mode_idx]; break; + } memcpy( mode, ¤t_modes[mode_idx].mode, sizeof(*mode) ); LeaveCriticalSection( ¤t_modes_section ); return TRUE; } - LeaveCriticalSection( ¤t_modes_section ); screen_resources = xrandr_get_screen_resources(); if (!screen_resources) @@ -1473,21 +1476,15 @@ static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode ) mode->u1.s2.dmPosition.y = crtc_info->y - primary.top; ret = TRUE; - EnterCriticalSection( ¤t_modes_section ); - for (mode_idx = 0; mode_idx < current_mode_count; ++mode_idx) +done: + if (ret && mode_ptr) { - if (current_modes[mode_idx].id != id) - continue; - - memcpy( ¤t_modes[mode_idx].mode, mode, sizeof(*mode) ); - current_modes[mode_idx].mode.dmSize = sizeof(*mode); - current_modes[mode_idx].mode.dmDriverExtra = 0; - current_modes[mode_idx].loaded = TRUE; - break; + memcpy( &mode_ptr->mode, mode, sizeof(*mode) ); + mode_ptr->mode.dmSize = sizeof(*mode); + mode_ptr->mode.dmDriverExtra = 0; + mode_ptr->loaded = TRUE; } LeaveCriticalSection( ¤t_modes_section ); - -done: if (crtc_info) pXRRFreeCrtcInfo( crtc_info ); if (output_info)
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
82
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
72
73
74
75
76
77
78
79
80
81
82
Results per page:
10
25
50
100
200