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
April 2016
----- 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
2 participants
750 discussions
Start a n
N
ew thread
Alex Henrie : qedit: Remove redundant "return 0" from Release functions.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: 36113e6ded8b19f4c5a22771ed12cbd8564e3155 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36113e6ded8b19f4c5a22771e…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Wed Apr 27 23:12:54 2016 -0600 qedit: Remove redundant "return 0" from Release functions. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/mediadet.c | 1 - dlls/qedit/samplegrabber.c | 2 -- dlls/qedit/timeline.c | 3 --- 3 files changed, 6 deletions(-) diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index 53ab75a..b7a5abb 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -112,7 +112,6 @@ static ULONG WINAPI MediaDet_inner_Release(IUnknown *iface) { MD_cleanup(This); CoTaskMemFree(This); - return 0; } return ref; diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 946dba9..e3f387b 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -92,7 +92,6 @@ static ULONG WINAPI Single_IEnumMediaTypes_Release(IEnumMediaTypes *iface) if (This->mtype.pbFormat) CoTaskMemFree(This->mtype.pbFormat); CoTaskMemFree(This); - return 0; } return refCount; } @@ -335,7 +334,6 @@ static ULONG WINAPI SampleGrabber_Release(IUnknown *iface) { SampleGrabber_cleanup(This); CoTaskMemFree(This); - return 0; } return ref; } diff --git a/dlls/qedit/timeline.c b/dlls/qedit/timeline.c index 8293c8f..906efd5 100644 --- a/dlls/qedit/timeline.c +++ b/dlls/qedit/timeline.c @@ -106,10 +106,7 @@ static ULONG WINAPI Timeline_Release(IUnknown *iface) TRACE("(%p) new ref = %u\n", This, ref); if (ref == 0) - { CoTaskMemFree(This); - return 0; - } return ref; }
1
0
0
0
Alex Henrie : qedit: Return E_POINTER from Timeline_QueryInterface if ppv is NULL.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: 501de13b6cab4743baf33680e812613f5fb21f7d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=501de13b6cab4743baf33680e…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Apr 28 08:08:00 2016 -0600 qedit: Return E_POINTER from Timeline_QueryInterface if ppv is NULL. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/tests/timeline.c | 9 ++++++++- dlls/qedit/timeline.c | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/qedit/tests/timeline.c b/dlls/qedit/tests/timeline.c index 2d37010..40cf774 100644 --- a/dlls/qedit/tests/timeline.c +++ b/dlls/qedit/tests/timeline.c @@ -29,7 +29,7 @@ static void test_timeline(void) HRESULT hr; IAMTimeline *timeline = NULL; IAMTimeline *timeline2 = (IAMTimeline *)0xdeadbeef; - IAMTimelineObj *obj; + IAMTimelineObj *obj = (IAMTimelineObj *)0xdeadbeef; IAMTimelineObj obj_iface; TIMELINE_MAJOR_TYPE type; @@ -37,6 +37,13 @@ static void test_timeline(void) ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "CoCreateInstance failed: %08x\n", hr); if (!timeline) return; + hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimelineObj, NULL); + ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr); + + hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimelineObj, (void **)&obj); + ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr); + ok(!obj, "Expected NULL got %p\n", obj); + hr = IAMTimeline_CreateEmptyNode(timeline, NULL, 0); ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr); diff --git a/dlls/qedit/timeline.c b/dlls/qedit/timeline.c index 8c6ac5b..8293c8f 100644 --- a/dlls/qedit/timeline.c +++ b/dlls/qedit/timeline.c @@ -70,6 +70,9 @@ static HRESULT WINAPI Timeline_QueryInterface(IUnknown *iface, REFIID riid, void TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + if (!ppv) + return E_POINTER; + *ppv = NULL; if (IsEqualIID(riid, &IID_IUnknown)) *ppv = &This->IUnknown_inner;
1
0
0
0
Alexandre Julliard : kernel32: Properly check the NtQueryDirectoryFile return status.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: 02f80187f0ca19deb13f6615d1acd2245d69eef7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02f80187f0ca19deb13f6615d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 29 23:19:16 2016 +0900 kernel32: Properly check the NtQueryDirectoryFile return status. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/file.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index bd9e689..56bdb52 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -2077,7 +2077,6 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level, } else { - IO_STATUS_BLOCK io; BOOL has_wildcard = strpbrkW( info->mask.Buffer, wildcardsW ) != NULL; info->data_size = has_wildcard ? 8192 : max_entry_size * 2; @@ -2091,12 +2090,12 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level, return INVALID_HANDLE_VALUE; } - NtQueryDirectoryFile( info->handle, 0, NULL, NULL, &io, info->data, info->data_size, - FileBothDirectoryInformation, FALSE, &info->mask, TRUE ); - if (io.u.Status) + status = NtQueryDirectoryFile( info->handle, 0, NULL, NULL, &io, info->data, info->data_size, + FileBothDirectoryInformation, FALSE, &info->mask, TRUE ); + if (status) { FindClose( info ); - SetLastError( RtlNtStatusToDosError( io.u.Status ) ); + SetLastError( RtlNtStatusToDosError( status ) ); return INVALID_HANDLE_VALUE; } @@ -2148,6 +2147,7 @@ BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data ) FIND_FIRST_INFO *info; FILE_BOTH_DIR_INFORMATION *dir_info; BOOL ret = FALSE; + NTSTATUS status; TRACE("%p %p\n", handle, data); @@ -2173,15 +2173,15 @@ BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data ) IO_STATUS_BLOCK io; if (info->data_size) - NtQueryDirectoryFile( info->handle, 0, NULL, NULL, &io, info->data, info->data_size, - FileBothDirectoryInformation, FALSE, &info->mask, FALSE ); + status = NtQueryDirectoryFile( info->handle, 0, NULL, NULL, &io, info->data, info->data_size, + FileBothDirectoryInformation, FALSE, &info->mask, FALSE ); else - io.u.Status = STATUS_NO_MORE_FILES; + status = STATUS_NO_MORE_FILES; - if (io.u.Status) + if (status) { - SetLastError( RtlNtStatusToDosError( io.u.Status ) ); - if (io.u.Status == STATUS_NO_MORE_FILES) + SetLastError( RtlNtStatusToDosError( status ) ); + if (status == STATUS_NO_MORE_FILES) { CloseHandle( info->handle ); HeapFree( GetProcessHeap(), 0, info->data );
1
0
0
0
Alexandre Julliard : ntdll: Properly check the NtQueryDirectoryFile return status.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: 9fef5dc839051ebda5bd93acfc8d5107a9a49de8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9fef5dc839051ebda5bd93acf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 29 23:14:23 2016 +0900 ntdll: Properly check the NtQueryDirectoryFile return status. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/actctx.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 4aa1a72..d26a5c4 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -2694,9 +2694,8 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai ) ai->version.major, ai->version.minor, lang ); RtlInitUnicodeString( &lookup_us, lookup ); - NtQueryDirectoryFile( dir, 0, NULL, NULL, &io, buffer, sizeof(buffer), - FileBothDirectoryInformation, FALSE, &lookup_us, TRUE ); - if (io.u.Status == STATUS_SUCCESS) + if (!NtQueryDirectoryFile( dir, 0, NULL, NULL, &io, buffer, sizeof(buffer), + FileBothDirectoryInformation, FALSE, &lookup_us, TRUE )) { ULONG min_build = ai->version.build, min_revision = ai->version.revision; FILE_BOTH_DIR_INFORMATION *dir_info; @@ -2709,9 +2708,9 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai ) { if (data_pos >= data_len) { - NtQueryDirectoryFile( dir, 0, NULL, NULL, &io, buffer, sizeof(buffer), - FileBothDirectoryInformation, FALSE, &lookup_us, FALSE ); - if (io.u.Status != STATUS_SUCCESS) break; + if (NtQueryDirectoryFile( dir, 0, NULL, NULL, &io, buffer, sizeof(buffer), + FileBothDirectoryInformation, FALSE, &lookup_us, FALSE )) + break; data_len = io.Information; data_pos = 0; }
1
0
0
0
Hans Leidekker : kernel32: Improve the stub for GetThreadPreferredUILanguages.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: c90845cf9330e7b731508ee5e40616341bdb7ad0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c90845cf9330e7b731508ee5e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Apr 29 10:14:35 2016 +0200 kernel32: Improve the stub for GetThreadPreferredUILanguages. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 69 ++++++++++++++++++++++++++++++-------------- dlls/kernel32/tests/locale.c | 29 +++++++++++++++++++ dlls/kernel32/thread.c | 20 ------------- include/winnls.h | 1 + 4 files changed, 77 insertions(+), 42 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 528f945..a2f369a 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -1048,35 +1048,17 @@ INT WINAPI GetSystemDefaultLocaleName(LPWSTR localename, INT len) return LCIDToLocaleName(lcid, localename, len, 0); } -/*********************************************************************** - * GetSystemPreferredUILanguages (KERNEL32.@) - */ -BOOL WINAPI GetSystemPreferredUILanguages(DWORD flags, ULONG* count, WCHAR* buffer, ULONG* size) +static BOOL get_dummy_preferred_ui_language( DWORD flags, ULONG *count, WCHAR *buffer, ULONG *size ) { LCTYPE type; int lsize; - if (flags & ~(MUI_LANGUAGE_NAME | MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS)) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - if ((flags & MUI_LANGUAGE_NAME) && (flags & MUI_LANGUAGE_ID)) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - if (*size && !buffer) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } FIXME("(0x%x %p %p %p) returning a dummy value (current locale)\n", flags, count, buffer, size); if (flags & MUI_LANGUAGE_ID) - type = LOCALE_ILANGUAGE; - else - type = LOCALE_SNAME; + type = LOCALE_ILANGUAGE; + else + type = LOCALE_SNAME; lsize = GetLocaleInfoW(LOCALE_SYSTEM_DEFAULT, type, NULL, 0); if (!lsize) @@ -1109,6 +1091,49 @@ BOOL WINAPI GetSystemPreferredUILanguages(DWORD flags, ULONG* count, WCHAR* buff *count = 1; TRACE("returned variable content: %d, \"%s\", %d\n", *count, debugstr_w(buffer), *size); return TRUE; + +} + +/*********************************************************************** + * GetSystemPreferredUILanguages (KERNEL32.@) + */ +BOOL WINAPI GetSystemPreferredUILanguages(DWORD flags, ULONG* count, WCHAR* buffer, ULONG* size) +{ + if (flags & ~(MUI_LANGUAGE_NAME | MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if ((flags & MUI_LANGUAGE_NAME) && (flags & MUI_LANGUAGE_ID)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (*size && !buffer) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + return get_dummy_preferred_ui_language( flags, count, buffer, size ); +} + +/*********************************************************************** + * SetThreadPreferredUILanguages (KERNEL32.@) + */ +BOOL WINAPI SetThreadPreferredUILanguages( DWORD flags, PCZZWSTR buffer, PULONG count ) +{ + FIXME( "%u, %p, %p\n", flags, buffer, count ); + return TRUE; +} + +/*********************************************************************** + * GetThreadPreferredUILanguages (KERNEL32.@) + */ +BOOL WINAPI GetThreadPreferredUILanguages( DWORD flags, ULONG *count, WCHAR *buf, ULONG *size ) +{ + FIXME( "%08x, %p, %p %p\n", flags, count, buf, size ); + return get_dummy_preferred_ui_language( flags, count, buf, size ); } /*********************************************************************** diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 57dc418..20f52d2 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -98,6 +98,7 @@ static INT (WINAPI *pGetGeoInfoA)(GEOID, GEOTYPE, LPSTR, INT, LANGID); static INT (WINAPI *pGetGeoInfoW)(GEOID, GEOTYPE, LPWSTR, INT, LANGID); static BOOL (WINAPI *pEnumSystemGeoID)(GEOCLASS, GEOID, GEO_ENUMPROC); static BOOL (WINAPI *pGetSystemPreferredUILanguages)(DWORD, ULONG*, WCHAR*, ULONG*); +static BOOL (WINAPI *pGetThreadPreferredUILanguages)(DWORD, ULONG*, WCHAR*, ULONG*); static void InitFunctionPointers(void) { @@ -127,6 +128,7 @@ static void InitFunctionPointers(void) X(GetGeoInfoW); X(EnumSystemGeoID); X(GetSystemPreferredUILanguages); + X(GetThreadPreferredUILanguages); #undef X } @@ -4770,6 +4772,32 @@ static void test_GetSystemPreferredUILanguages(void) "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); } +static void test_GetThreadPreferredUILanguages(void) +{ + BOOL ret; + ULONG count, size; + WCHAR *buf; + + if (!pGetThreadPreferredUILanguages) + { + win_skip("GetThreadPreferredUILanguages is not available.\n"); + return; + } + + size = count = 0; + ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID|MUI_UI_FALLBACK, &count, NULL, &size); + ok(ret, "got %u\n", GetLastError()); + ok(count, "expected count > 0\n"); + ok(size, "expected size > 0\n"); + + count = 0; + buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size * sizeof(WCHAR)); + ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID|MUI_UI_FALLBACK, &count, buf, &size); + ok(ret, "got %u\n", GetLastError()); + ok(count, "expected count > 0\n"); + HeapFree(GetProcessHeap(), 0, buf); +} + START_TEST(locale) { InitFunctionPointers(); @@ -4813,6 +4841,7 @@ START_TEST(locale) test_EnumSystemGeoID(); test_invariant(); test_GetSystemPreferredUILanguages(); + test_GetThreadPreferredUILanguages(); /* this requires collation table patch to make it MS compatible */ if (0) test_sorting(); } diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index 0e9de82..6630e7f 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -888,26 +888,6 @@ BOOL WINAPI GetThreadIOPendingFlag( HANDLE thread, PBOOL io_pending ) } /*********************************************************************** - * SetThreadPreferredUILanguages (KERNEL32.@) - */ -BOOL WINAPI SetThreadPreferredUILanguages( DWORD flags, PCZZWSTR buffer, PULONG count ) -{ - FIXME( "%u, %p, %p\n", flags, buffer, count ); - return TRUE; -} - -/*********************************************************************** - * GetThreadPreferredUILanguages (KERNEL32.@) - */ -BOOL WINAPI GetThreadPreferredUILanguages( DWORD flags, PULONG count, PCZZWSTR buffer, PULONG buffersize ) -{ - FIXME( "%u, %p, %p %p\n", flags, count, buffer, buffersize ); - *count = 0; - *buffersize = 0; - return TRUE; -} - -/*********************************************************************** * CallbackMayRunLong (KERNEL32.@) */ BOOL WINAPI CallbackMayRunLong( TP_CALLBACK_INSTANCE *instance ) diff --git a/include/winnls.h b/include/winnls.h index 6e5897b..1a7baaf 100644 --- a/include/winnls.h +++ b/include/winnls.h @@ -909,6 +909,7 @@ WINBASEAPI LCID WINAPI GetSystemDefaultLCID(void); WINBASEAPI LANGID WINAPI GetSystemDefaultUILanguage(void); WINBASEAPI BOOL WINAPI GetSystemPreferredUILanguages(DWORD,ULONG*,WCHAR*,ULONG*); WINBASEAPI LCID WINAPI GetThreadLocale(void); +WINBASEAPI BOOL WINAPI GetThreadPreferredUILanguages(DWORD,ULONG*,WCHAR*,ULONG*); WINBASEAPI INT WINAPI GetTimeFormatA(LCID,DWORD,const SYSTEMTIME*,LPCSTR,LPSTR,INT); WINBASEAPI INT WINAPI GetTimeFormatEx(LPCWSTR,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,INT); WINBASEAPI INT WINAPI GetTimeFormatW(LCID,DWORD,const SYSTEMTIME*,LPCWSTR,LPWSTR,INT);
1
0
0
0
Sebastian Lackner : user32: Implement SetCoalescableTimer and add basic tests.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: 57b7a9937deb3f01960fc426f6cedf2b79fd7885 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=57b7a9937deb3f01960fc426f…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Apr 29 12:34:53 2016 +0200 user32: Implement SetCoalescableTimer and add basic tests. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/message.c | 13 +++++++++++-- dlls/user32/tests/msg.c | 16 ++++++++++++++++ dlls/user32/user32.spec | 1 + include/winuser.h | 7 +++++++ 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/dlls/user32/message.c b/dlls/user32/message.c index fb4786b..bc6b661 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -4443,9 +4443,9 @@ BOOL WINAPI MessageBeep( UINT i ) /*********************************************************************** - * SetTimer (USER32.@) + * SetCoalescableTimer (USER32.@) */ -UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc ) +UINT_PTR WINAPI SetCoalescableTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc, ULONG tolerance ) { UINT_PTR ret; WNDPROC winproc = 0; @@ -4475,6 +4475,15 @@ UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc ) } +/****************************************************************** + * SetTimer (USER32.@) + */ +UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout, TIMERPROC proc ) +{ + return SetCoalescableTimer( hwnd, id, timeout, proc, TIMERV_DEFAULT_COALESCING ); +} + + /*********************************************************************** * SetSystemTimer (USER32.@) */ diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 8ab6e15..e39f8a1 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -1743,6 +1743,7 @@ static HMONITOR (WINAPI *pMonitorFromPoint)(POINT,DWORD); static BOOL (WINAPI *pUpdateLayeredWindow)(HWND,HDC,POINT*,SIZE*,HDC,POINT*,COLORREF,BLENDFUNCTION*,DWORD); static UINT_PTR (WINAPI *pSetSystemTimer)(HWND, UINT_PTR, UINT, TIMERPROC); static UINT_PTR (WINAPI *pKillSystemTimer)(HWND, UINT_PTR); +static UINT_PTR (WINAPI *pSetCoalescableTimer)(HWND, UINT_PTR, UINT, TIMERPROC, ULONG); /* kernel32 functions */ static BOOL (WINAPI *pGetCPInfoExA)(UINT, DWORD, LPCPINFOEXA); @@ -1769,6 +1770,7 @@ static void init_procs(void) GET_PROC(user32, UpdateLayeredWindow) GET_PROC(user32, SetSystemTimer) GET_PROC(user32, KillSystemTimer) + GET_PROC(user32, SetCoalescableTimer) GET_PROC(kernel32, GetCPInfoExA) @@ -8995,6 +8997,20 @@ static void test_timers_no_wnd(void) KillTimer(NULL, id); /* Note: SetSystemTimer doesn't support a NULL window, see test_timers */ + if (pSetCoalescableTimer) + { + count = 0; + id = pSetCoalescableTimer(NULL, 0, 0, callback_count, 0); + ok(id != 0, "SetCoalescableTimer failed with %u.\n", GetLastError()); + start = GetTickCount(); + while (GetTickCount()-start < 100 && GetMessageA(&msg, NULL, 0, 0)) + DispatchMessageA(&msg); + ok(count > 1, "expected count > 1, got %d.\n", count); + KillTimer(NULL, id); + } + else + win_skip("SetCoalescableTimer not available.\n"); + /* Check what happens when we're running out of timers */ for (i=0; i<sizeof(ids)/sizeof(ids[0]); i++) { diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index c479879..aa10a80 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -624,6 +624,7 @@ @ stdcall SetClassWord(long long long) @ stdcall SetClipboardData(long long) @ stdcall SetClipboardViewer(long) +@ stdcall SetCoalescableTimer(long long long ptr long) # @ stub SetConsoleReserveKeys @ stdcall SetCursor(long) @ stub SetCursorContents diff --git a/include/winuser.h b/include/winuser.h index 9c4586f..0c527fb 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -2560,6 +2560,12 @@ typedef struct tagMINIMIZEDMETRICS { #define USER_TIMER_MINIMUM 0x0000000A #define USER_TIMER_MAXIMUM 0x7FFFFFFF +/* SetCoalescableTimer() tolerances */ +#define TIMERV_DEFAULT_COALESCING 0 +#define TIMERV_NO_COALESCING 0xFFFFFFFF +#define TIMERV_COALESCING_MIN 1 +#define TIMERV_COALESCING_MAX 0x7FFFFFF5 + /* AnimateWindow() flags */ #define AW_SLIDE 0x00040000 #define AW_ACTIVATE 0x00020000 @@ -3943,6 +3949,7 @@ WINUSERAPI ULONG_PTR WINAPI SetClassLongPtrW(HWND,INT,LONG_PTR); WINUSERAPI WORD WINAPI SetClassWord(HWND,INT,WORD); WINUSERAPI HANDLE WINAPI SetClipboardData(UINT,HANDLE); WINUSERAPI HWND WINAPI SetClipboardViewer(HWND); +WINUSERAPI UINT_PTR WINAPI SetCoalescableTimer(HWND,UINT_PTR,UINT,TIMERPROC,ULONG); WINUSERAPI HCURSOR WINAPI SetCursor(HCURSOR); WINUSERAPI BOOL WINAPI SetCursorPos(INT,INT); WINUSERAPI VOID WINAPI SetDebugErrorLevel(DWORD);
1
0
0
0
Sebastian Lackner : user32/tests: Add additional test for window station name.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: f5b8eb497764018f5e4a592c6358e5122d1f11cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5b8eb497764018f5e4a592c6…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Apr 25 23:25:33 2016 +0200 user32/tests: Add additional test for window station name. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/winstation.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index e49420b..94be4c9 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -114,6 +114,8 @@ static void test_handles(void) DWORD id, flags, le; ATOM atom; char buffer[20]; + DWORD size; + BOOL ret; /* win stations */ @@ -215,6 +217,12 @@ static void test_handles(void) w2 = CreateWindowStationA( "", 0, WINSTA_ALL_ACCESS, NULL ); ok( w2 != 0, "create station failed err %u\n", GetLastError() ); + memset( buffer, 0, sizeof(buffer) ); + ret = GetUserObjectInformationA( w2, UOI_NAME, buffer, sizeof(buffer), &size ); + ok( ret, "GetUserObjectInformationA failed with error %u\n", GetLastError() ); + todo_wine ok( !memcmp(buffer, "Service-0x0-", 12), "unexpected window station name '%s'\n", buffer ); + todo_wine ok( buffer[strlen(buffer) - 1] == '$', "unexpected window station name '%s'\n", buffer ); + SetLastError( 0xdeadbeef ); w3 = OpenWindowStationA( "", TRUE, WINSTA_ALL_ACCESS ); todo_wine
1
0
0
0
Piotr Caban : gdi32/enhmfdrv: Don' t update document bounds in PolyPolyline within a path.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: dfb750b9c2f3d57be332fe97f12a39ee737e7767 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dfb750b9c2f3d57be332fe97f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Apr 28 18:49:07 2016 +0200 gdi32/enhmfdrv: Don't update document bounds in PolyPolyline within a path. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/graphics.c | 5 +++-- dlls/gdi32/tests/metafile.c | 13 +++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 1b5d26d..b139305 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -533,6 +533,7 @@ static BOOL EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polys, DWORD iType) { + EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE*) dev; EMRPOLYPOLYLINE *emr; DWORD cptl = 0, poly, size, i; INT point; @@ -576,7 +577,7 @@ EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT po if(use_small_emr) emr->emr.iType += EMR_POLYPOLYLINE16 - EMR_POLYPOLYLINE; emr->emr.nSize = size; - if(bounds_valid) + if(bounds_valid && !physDev->path) emr->rclBounds = bounds; else emr->rclBounds = empty; @@ -608,7 +609,7 @@ EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT po ret = FALSE; SetLastError( ERROR_INVALID_PARAMETER ); } - if(ret) + if(ret && !physDev->path) EMFDRV_UpdateBBox( dev, &emr->rclBounds ); HeapFree( GetProcessHeap(), 0, emr ); return ret; diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 64ad004..9a5c1a5 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3585,7 +3585,7 @@ static const unsigned char EMF_PATH_BITS[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0xff, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xd4, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x0c, 0x02, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x3e, 0x04, 0x00, 0x00, @@ -3634,6 +3634,13 @@ static const unsigned char EMF_PATH_BITS[] = 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, + 0x5a, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00, + 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, @@ -3643,6 +3650,7 @@ static const unsigned char EMF_PATH_BITS[] = static void test_emf_GetPath(void) { POINT pts[4] = {{10, 10}, {20, 10}, {10, 20}, {20, 20}}; + DWORD counts[2] = {2, 2}; HDC hdcMetafile; HENHMETAFILE hemf; BOOL ret; @@ -3670,10 +3678,11 @@ static void test_emf_GetPath(void) Ellipse(hdcMetafile, 10, 10, 20, 20); RoundRect(hdcMetafile, 10, 10, 20, 20, 3, 5); Polyline(hdcMetafile, pts, 4); + PolyPolyline(hdcMetafile, pts, counts, 2); EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 73, "GetPath returned %d.\n", size); + todo_wine ok( size == 77, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
1
0
0
0
Piotr Caban : gdi32/enhmfdrv: Don' t update document bounds in Polyline within a path.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: 67e26bec8dc5d0ca4d1c60772e57a5d74890b490 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67e26bec8dc5d0ca4d1c60772…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Apr 28 18:48:58 2016 +0200 gdi32/enhmfdrv: Don't update document bounds in Polyline within a path. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/graphics.c | 36 +++++++++++++++++++++++++++--------- dlls/gdi32/tests/metafile.c | 20 ++++++++++++++------ 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 98121e5..1b5d26d 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -347,6 +347,7 @@ COLORREF EMFDRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) static BOOL EMFDRV_Polylinegon( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) { + EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE*) dev; EMRPOLYLINE *emr; DWORD size; INT i; @@ -358,6 +359,17 @@ EMFDRV_Polylinegon( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) emr->emr.iType = iType; emr->emr.nSize = size; + emr->cptl = count; + memcpy(emr->aptl, pt, count * sizeof(POINTL)); + + if(physDev->path) { + emr->rclBounds.left = emr->rclBounds.top = 0; + emr->rclBounds.right = emr->rclBounds.bottom = -1; + ret = EMFDRV_WriteRecord( dev, &emr->emr ); + HeapFree( GetProcessHeap(), 0, emr ); + return ret; + } + if(iType == EMR_POLYBEZIERTO) { POINT cur_pt; @@ -384,9 +396,6 @@ EMFDRV_Polylinegon( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) emr->rclBounds.bottom = pt[i].y; } - emr->cptl = count; - memcpy(emr->aptl, pt, count * sizeof(POINTL)); - ret = EMFDRV_WriteRecord( dev, &emr->emr ); if(ret) EMFDRV_UpdateBBox( dev, &emr->rclBounds ); @@ -406,6 +415,7 @@ EMFDRV_Polylinegon( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) static BOOL EMFDRV_Polylinegon16( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) { + EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE*) dev; EMRPOLYLINE16 *emr; DWORD size; INT i; @@ -424,6 +434,20 @@ EMFDRV_Polylinegon16( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) emr->emr.iType = iType; emr->emr.nSize = size; + emr->cpts = count; + for(i = 0; i < count; i++ ) { + emr->apts[i].x = pt[i].x; + emr->apts[i].y = pt[i].y; + } + + if(physDev->path) { + emr->rclBounds.left = emr->rclBounds.top = 0; + emr->rclBounds.right = emr->rclBounds.bottom = -1; + ret = EMFDRV_WriteRecord( dev, &emr->emr ); + HeapFree( GetProcessHeap(), 0, emr ); + return ret; + } + if(iType == EMR_POLYBEZIERTO16) { POINT cur_pt; @@ -450,12 +474,6 @@ EMFDRV_Polylinegon16( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) emr->rclBounds.bottom = pt[i].y; } - emr->cpts = count; - for(i = 0; i < count; i++ ) { - emr->apts[i].x = pt[i].x; - emr->apts[i].y = pt[i].y; - } - ret = EMFDRV_WriteRecord( dev, &emr->emr ); if(ret) EMFDRV_UpdateBBox( dev, &emr->rclBounds ); diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index bdc2a0a..64ad004 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3585,7 +3585,7 @@ static const unsigned char EMF_PATH_BITS[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0xff, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xa8, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, + 0xd4, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x3e, 0x04, 0x00, 0x00, @@ -3628,14 +3628,21 @@ static const unsigned char EMF_PATH_BITS[] = 0x20, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x05, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 + 0x05, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, + 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00, + 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, + 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00 }; static void test_emf_GetPath(void) { + POINT pts[4] = {{10, 10}, {20, 10}, {10, 20}, {20, 20}}; HDC hdcMetafile; HENHMETAFILE hemf; BOOL ret; @@ -3662,10 +3669,11 @@ static void test_emf_GetPath(void) Pie(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21); Ellipse(hdcMetafile, 10, 10, 20, 20); RoundRect(hdcMetafile, 10, 10, 20, 20, 3, 5); + Polyline(hdcMetafile, pts, 4); EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 69, "GetPath returned %d.\n", size); + todo_wine ok( size == 73, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
1
0
0
0
Piotr Caban : gdi32/enhmfdrv: Don' t update document bounds in RoundRect within a path.
by Alexandre Julliard
29 Apr '16
29 Apr '16
Module: wine Branch: master Commit: 0d84feaf49bfcce1e82930f4e08b577b537710ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d84feaf49bfcce1e82930f4e…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Apr 28 18:48:46 2016 +0200 gdi32/enhmfdrv: Don't update document bounds in RoundRect within a path. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/graphics.c | 4 +++- dlls/gdi32/tests/metafile.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 5b1b0a4..98121e5 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -288,6 +288,7 @@ BOOL EMFDRV_Rectangle(PHYSDEV dev, INT left, INT top, INT right, INT bottom) BOOL EMFDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT ell_width, INT ell_height ) { + EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE*) dev; EMRROUNDRECT emr; INT temp; @@ -310,7 +311,8 @@ BOOL EMFDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, emr.szlCorner.cx = ell_width; emr.szlCorner.cy = ell_height; - EMFDRV_UpdateBBox( dev, &emr.rclBox ); + if(!physDev->path) + EMFDRV_UpdateBBox( dev, &emr.rclBox ); return EMFDRV_WriteRecord( dev, &emr.emr ); } diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 3e989c4..bdc2a0a 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3585,7 +3585,7 @@ static const unsigned char EMF_PATH_BITS[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0xff, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0x88, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0xa8, 0x01, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x3e, 0x04, 0x00, 0x00, @@ -3624,7 +3624,11 @@ static const unsigned char EMF_PATH_BITS[] = 0x15, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, - 0x13, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 @@ -3657,10 +3661,11 @@ static void test_emf_GetPath(void) Chord(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21); Pie(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21); Ellipse(hdcMetafile, 10, 10, 20, 20); + RoundRect(hdcMetafile, 10, 10, 20, 20, 3, 5); EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 53, "GetPath returned %d.\n", size); + todo_wine ok( size == 69, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
1
0
0
0
← Newer
1
2
3
4
5
...
75
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
Results per page:
10
25
50
100
200