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
November 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
2 participants
951 discussions
Start a n
N
ew thread
Nikolay Sivov : evr/mixer: Fix rectangle scaling helper argument check (Coverity).
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 82965df653e5bc86aa49ba8af60beaefb03e7d86 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=82965df653e5bc86aa49ba8a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 8 14:57:00 2021 +0300 evr/mixer: Fix rectangle scaling helper argument check (Coverity). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index bb3f938cb64..b6b4d148f90 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -1237,7 +1237,7 @@ static HRESULT video_mixer_get_d3d_device(struct video_mixer *mixer, IDirect3DDe static void video_mixer_scale_rect(RECT *rect, unsigned int width, unsigned int height, const MFVideoNormalizedRect *scale) { - if (rect->left == 0.0f && rect->top == 0.0f && rect->right == 1.0f && rect->bottom == 1.0f) + if (scale->left == 0.0f && scale->top == 0.0f && scale->right == 1.0f && scale->bottom == 1.0f) { SetRect(rect, 0, 0, width, height); }
1
0
0
0
Jacek Caban : win32u: Don't use free_region in alloc_region.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 2d1e3e5d13bf0b9c295889169f13e4d7765fe088 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d1e3e5d13bf0b9c29588916…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 8 14:49:14 2021 +0100 win32u: Don't use free_region in alloc_region. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/win32u/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/win32u/region.c b/dlls/win32u/region.c index 8555be96f72..e3e840a1554 100644 --- a/dlls/win32u/region.c +++ b/dlls/win32u/region.c @@ -451,7 +451,7 @@ static WINEREGION *alloc_region( INT n ) if (rgn && !init_region( rgn, n )) { - free_region( rgn ); + free( rgn ); rgn = NULL; } return rgn;
1
0
0
0
Jacek Caban : win32u: Move NtUserRemoveProp implementation from user32.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: ed928dc49e7b038df39a87bd30ae4acf4492ed95 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ed928dc49e7b038df39a87bd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 8 14:48:55 2021 +0100 win32u: Move NtUserRemoveProp implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/property.c | 13 +------------ dlls/win32u/syscall.c | 1 + dlls/win32u/tests/win32u.c | 6 ++++++ dlls/win32u/win32u.spec | 2 +- dlls/win32u/window.c | 24 ++++++++++++++++++++++++ dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 8 ++++++++ 7 files changed, 42 insertions(+), 13 deletions(-) diff --git a/dlls/user32/property.c b/dlls/user32/property.c index b31169120d7..4d55c4dfac8 100644 --- a/dlls/user32/property.c +++ b/dlls/user32/property.c @@ -170,18 +170,7 @@ HANDLE WINAPI RemovePropA( HWND hwnd, LPCSTR str ) */ HANDLE WINAPI RemovePropW( HWND hwnd, LPCWSTR str ) { - ULONG_PTR ret = 0; - - SERVER_START_REQ( remove_window_property ) - { - req->window = wine_server_user_handle( hwnd ); - if (IS_INTRESOURCE(str)) req->atom = LOWORD(str); - else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) ); - if (!wine_server_call_err( req )) ret = reply->data; - } - SERVER_END_REQ; - - return (HANDLE)ret; + return NtUserRemoveProp( hwnd, str ); } diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index ac4a880ee63..762729f815e 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -113,6 +113,7 @@ static void * const syscalls[] = NtUserOpenDesktop, NtUserOpenInputDesktop, NtUserOpenWindowStation, + NtUserRemoveProp, NtUserSetObjectInformation, NtUserSetProcessWindowStation, NtUserSetProp, diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 60e0085a913..a7c2e5ef029 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -52,6 +52,12 @@ static void test_window_props(void) prop = NtUserGetProp( hwnd, UlongToPtr(atom) ); ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop ); + prop = NtUserRemoveProp( hwnd, UlongToPtr(atom) ); + ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop ); + + prop = GetPropW(hwnd, L"test"); + ok(!prop, "prop = %p\n", prop); + GlobalDeleteAtom( atom ); DestroyWindow( hwnd ); } diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index eb01a5299fe..8327e588b77 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1148,7 +1148,7 @@ @ stub NtUserRemoveClipboardFormatListener @ stub NtUserRemoveInjectionDevice @ stub NtUserRemoveMenu -@ stub NtUserRemoveProp +@ stdcall -syscall NtUserRemoveProp(long wstr) @ stub NtUserRemoveVisualIdentifier @ stub NtUserReportInertia @ stub NtUserRequestMoveSizeOperation diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index dcf71b12c32..a84ceeefaf5 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -70,6 +70,30 @@ BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle ) return ret; } + +/*********************************************************************** + * NtUserRemoveProp (win32u.@) + * + * NOTE Native allows only ATOMs as the second argument. We allow strings + * to save extra server call in RemovePropW. + */ +HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str ) +{ + ULONG_PTR ret = 0; + + SERVER_START_REQ( remove_window_property ) + { + req->window = wine_server_user_handle( hwnd ); + if (IS_INTRESOURCE(str)) req->atom = LOWORD(str); + else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) ); + if (!wine_server_call_err( req )) ret = reply->data; + } + SERVER_END_REQ; + + return (HANDLE)ret; +} + + /***************************************************************************** * NtUserGetLayeredWindowAttributes (win32u.@) */ diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index d3a02181e64..8430d0b1527 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -100,6 +100,7 @@ SYSCALL_ENTRY( NtUserOpenDesktop ) \ SYSCALL_ENTRY( NtUserOpenInputDesktop ) \ SYSCALL_ENTRY( NtUserOpenWindowStation ) \ + SYSCALL_ENTRY( NtUserRemoveProp ) \ SYSCALL_ENTRY( NtUserSetObjectInformation ) \ SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserSetProp ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 48dc9d465df..2686d75a094 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -173,6 +173,14 @@ NTSTATUS WINAPI wow64_NtUserSetProp( UINT *args ) return NtUserSetProp( hwnd, str, handle ); } +NTSTATUS WINAPI wow64_NtUserRemoveProp( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + const WCHAR *str = get_ptr( &args ); + + return HandleToUlong( NtUserRemoveProp( hwnd, str )); +} + NTSTATUS WINAPI wow64_NtUserGetLayeredWindowAttributes( UINT *args ) { HWND hwnd = get_handle( &args );
1
0
0
0
Jacek Caban : win32u: Move NtUserGetProp implementation from user32.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 32ea3ec7b3f6b237b7362f639cf4f45b091e4391 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=32ea3ec7b3f6b237b7362f63…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 8 14:48:45 2021 +0100 win32u: Move NtUserGetProp implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/property.c | 12 +----------- dlls/win32u/syscall.c | 1 + dlls/win32u/tests/win32u.c | 3 +++ dlls/win32u/win32u.spec | 2 +- dlls/win32u/window.c | 21 +++++++++++++++++++++ dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 8 ++++++++ 7 files changed, 36 insertions(+), 12 deletions(-) diff --git a/dlls/user32/property.c b/dlls/user32/property.c index e6877a3b3e0..b31169120d7 100644 --- a/dlls/user32/property.c +++ b/dlls/user32/property.c @@ -126,17 +126,7 @@ HANDLE WINAPI GetPropA( HWND hwnd, LPCSTR str ) */ HANDLE WINAPI GetPropW( HWND hwnd, LPCWSTR str ) { - ULONG_PTR ret = 0; - - SERVER_START_REQ( get_window_property ) - { - req->window = wine_server_user_handle( hwnd ); - if (IS_INTRESOURCE(str)) req->atom = LOWORD(str); - else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) ); - if (!wine_server_call_err( req )) ret = reply->data; - } - SERVER_END_REQ; - return (HANDLE)ret; + return NtUserGetProp( hwnd, str ); } diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index c718510bbc7..ac4a880ee63 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -108,6 +108,7 @@ static void * const syscalls[] = NtUserGetLayeredWindowAttributes, NtUserGetObjectInformation, NtUserGetProcessWindowStation, + NtUserGetProp, NtUserGetThreadDesktop, NtUserOpenDesktop, NtUserOpenInputDesktop, diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 079c4eead23..60e0085a913 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -49,6 +49,9 @@ static void test_window_props(void) prop = GetPropW( hwnd, L"test" ); ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop ); + prop = NtUserGetProp( hwnd, UlongToPtr(atom) ); + ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop ); + GlobalDeleteAtom( atom ); DestroyWindow( hwnd ); } diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 97df44f3215..eb01a5299fe 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -980,7 +980,7 @@ @ stub NtUserGetProcessDpiAwarenessContext @ stub NtUserGetProcessUIContextInformation @ stdcall -syscall NtUserGetProcessWindowStation() -@ stub NtUserGetProp +@ stdcall -syscall NtUserGetProp(long wstr) @ stub NtUserGetQueueStatus @ stub NtUserGetQueueStatusReadonly @ stub NtUserGetRawInputBuffer diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 9543d4c4a54..dcf71b12c32 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -27,6 +27,27 @@ #include "wine/server.h" +/*********************************************************************** + * NtUserGetProp (win32u.@) + * + * NOTE Native allows only ATOMs as the second argument. We allow strings + * to save extra server call in GetPropW. + */ +HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str ) +{ + ULONG_PTR ret = 0; + + SERVER_START_REQ( get_window_property ) + { + req->window = wine_server_user_handle( hwnd ); + if (IS_INTRESOURCE(str)) req->atom = LOWORD(str); + else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) ); + if (!wine_server_call_err( req )) ret = reply->data; + } + SERVER_END_REQ; + return (HANDLE)ret; +} + /***************************************************************************** * NtUserSetProp (win32u.@) * diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index fb265638750..d3a02181e64 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -95,6 +95,7 @@ SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \ SYSCALL_ENTRY( NtUserGetObjectInformation ) \ SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \ + SYSCALL_ENTRY( NtUserGetProp ) \ SYSCALL_ENTRY( NtUserGetThreadDesktop ) \ SYSCALL_ENTRY( NtUserOpenDesktop ) \ SYSCALL_ENTRY( NtUserOpenInputDesktop ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index d25f2271012..48dc9d465df 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -156,6 +156,14 @@ NTSTATUS WINAPI wow64_NtUserSetObjectInformation( UINT *args ) return NtUserSetObjectInformation( handle, index, info, len ); } +NTSTATUS WINAPI wow64_NtUserGetProp( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + const WCHAR *str = get_ptr( &args ); + + return HandleToUlong( NtUserGetProp( hwnd, str )); +} + NTSTATUS WINAPI wow64_NtUserSetProp( UINT *args ) { HWND hwnd = get_handle( &args );
1
0
0
0
Jacek Caban : win32u: Move NtUserSetProp implementation from user32.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 97fa9db478c7ac9575309c194161cc23c6a92161 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=97fa9db478c7ac9575309c19…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 8 14:48:37 2021 +0100 win32u: Move NtUserSetProp implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/property.c | 15 ++------------- dlls/win32u/syscall.c | 1 + dlls/win32u/tests/win32u.c | 21 +++++++++++++++++++++ dlls/win32u/win32u.spec | 2 +- dlls/win32u/window.c | 22 ++++++++++++++++++++++ dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 9 +++++++++ include/ntuser.h | 3 +++ 8 files changed, 60 insertions(+), 14 deletions(-) diff --git a/dlls/user32/property.c b/dlls/user32/property.c index b6fb66a5e3e..e6877a3b3e0 100644 --- a/dlls/user32/property.c +++ b/dlls/user32/property.c @@ -24,7 +24,7 @@ #include "windef.h" #include "winbase.h" #include "winnls.h" -#include "winuser.h" +#include "ntuser.h" #include "wine/server.h" /* size of buffer needed to store an atom string */ @@ -158,18 +158,7 @@ BOOL WINAPI SetPropA( HWND hwnd, LPCSTR str, HANDLE handle ) */ BOOL WINAPI SetPropW( HWND hwnd, LPCWSTR str, HANDLE handle ) { - BOOL ret; - - SERVER_START_REQ( set_window_property ) - { - req->window = wine_server_user_handle( hwnd ); - req->data = (ULONG_PTR)handle; - if (IS_INTRESOURCE(str)) req->atom = LOWORD(str); - else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) ); - ret = !wine_server_call_err( req ); - } - SERVER_END_REQ; - return ret; + return NtUserSetProp( hwnd, str, handle ); } diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 8b74deb0be7..c718510bbc7 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -114,6 +114,7 @@ static void * const syscalls[] = NtUserOpenWindowStation, NtUserSetObjectInformation, NtUserSetProcessWindowStation, + NtUserSetProp, NtUserSetThreadDesktop, }; diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 2f5014b80b4..079c4eead23 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -32,6 +32,26 @@ static void test_NtUserCloseWindowStation(void) "NtUserCloseWindowStation returned %x %u\n", ret, GetLastError() ); } +static void test_window_props(void) +{ + HANDLE prop; + ATOM atom; + HWND hwnd; + BOOL ret; + + hwnd = CreateWindowExA( 0, "static", NULL, WS_POPUP, 0,0,0,0,0,0,0, NULL ); + + atom = GlobalAddAtomW( L"test" ); + + ret = NtUserSetProp( hwnd, UlongToPtr(atom), UlongToHandle(0xdeadbeef) ); + ok( ret, "NtUserSetProp failed: %u\n", GetLastError() ); + + prop = GetPropW( hwnd, L"test" ); + ok( prop == UlongToHandle(0xdeadbeef), "prop = %p\n", prop ); + + GlobalDeleteAtom( atom ); + DestroyWindow( hwnd ); +} START_TEST(win32u) { @@ -39,4 +59,5 @@ START_TEST(win32u) GetDesktopWindow(); test_NtUserCloseWindowStation(); + test_window_props(); } diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 5c31b9017ee..97df44f3215 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1222,7 +1222,7 @@ @ stub NtUserSetProcessRestrictionExemption @ stub NtUserSetProcessUIAccessZorder @ stdcall -syscall NtUserSetProcessWindowStation(long) -@ stub NtUserSetProp +@ stdcall -syscall NtUserSetProp(long wstr ptr) @ stub NtUserSetScrollInfo @ stub NtUserSetSensorPresence @ stub NtUserSetSharedWindowData diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 03065c1a00a..9543d4c4a54 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -27,6 +27,28 @@ #include "wine/server.h" +/***************************************************************************** + * NtUserSetProp (win32u.@) + * + * NOTE Native allows only ATOMs as the second argument. We allow strings + * to save extra server call in SetPropW. + */ +BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle ) +{ + BOOL ret; + + SERVER_START_REQ( set_window_property ) + { + req->window = wine_server_user_handle( hwnd ); + req->data = (ULONG_PTR)handle; + if (IS_INTRESOURCE(str)) req->atom = LOWORD(str); + else wine_server_add_data( req, str, lstrlenW(str) * sizeof(WCHAR) ); + ret = !wine_server_call_err( req ); + } + SERVER_END_REQ; + return ret; +} + /***************************************************************************** * NtUserGetLayeredWindowAttributes (win32u.@) */ diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 7c6f00afe66..fb265638750 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -101,6 +101,7 @@ SYSCALL_ENTRY( NtUserOpenWindowStation ) \ SYSCALL_ENTRY( NtUserSetObjectInformation ) \ SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \ + SYSCALL_ENTRY( NtUserSetProp ) \ SYSCALL_ENTRY( NtUserSetThreadDesktop ) #endif /* __WOW64WIN_SYSCALL_H */ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index c33ab4e4dff..d25f2271012 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -156,6 +156,15 @@ NTSTATUS WINAPI wow64_NtUserSetObjectInformation( UINT *args ) return NtUserSetObjectInformation( handle, index, info, len ); } +NTSTATUS WINAPI wow64_NtUserSetProp( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + const WCHAR *str = get_ptr( &args ); + HANDLE handle = get_handle( &args ); + + return NtUserSetProp( hwnd, str, handle ); +} + NTSTATUS WINAPI wow64_NtUserGetLayeredWindowAttributes( UINT *args ) { HWND hwnd = get_handle( &args ); diff --git a/include/ntuser.h b/include/ntuser.h index a9b2ae65dad..c05c743b553 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -34,12 +34,15 @@ BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info, DWORD len, DWORD *needed ); HWINSTA WINAPI NtUserGetProcessWindowStation(void); +HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str ); HDESK WINAPI NtUserGetThreadDesktop( DWORD thread ); HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access ); BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len ); HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access ); HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access ); +HANDLE WINAPI NtUserRemoveProp( HWND hwnd, const WCHAR *str ); BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle ); +BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle ); BOOL WINAPI NtUserSetThreadDesktop( HDESK handle ); #endif /* _NTUSER_ */
1
0
0
0
Jacek Caban : win32u: Move NtUserGetLayeredWindowAttributes implementation from user32.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 89530400a06f176fcc1982f2304160d89f98c287 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=89530400a06f176fcc1982f2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 8 14:48:28 2021 +0100 win32u: Move NtUserGetLayeredWindowAttributes implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/user32.spec | 2 +- dlls/user32/win.c | 25 +--------------------- dlls/user32/winpos.c | 2 +- dlls/win32u/Makefile.in | 1 + dlls/win32u/ntgdi_private.h | 4 ---- dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/win32u/win32u_private.h | 7 ++++++- dlls/win32u/window.c | 50 ++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 10 +++++++++ include/ntuser.h | 1 + 12 files changed, 74 insertions(+), 32 deletions(-) diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 306f955b2a2..82cbfaa4be6 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -325,7 +325,7 @@ @ stdcall GetKeyboardType(long) @ stdcall GetLastActivePopup(long) @ stdcall GetLastInputInfo(ptr) -@ stdcall GetLayeredWindowAttributes(long ptr ptr ptr) +@ stdcall GetLayeredWindowAttributes(long ptr ptr ptr) NtUserGetLayeredWindowAttributes @ stdcall GetListBoxInfo(long) @ stdcall GetMenu(long) @ stdcall GetMenuBarInfo(long long long ptr) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 3c6810f4200..42a89badbe6 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -4064,29 +4064,6 @@ BOOL WINAPI SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO } -/***************************************************************************** - * GetLayeredWindowAttributes (USER32.@) - */ -BOOL WINAPI GetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags ) -{ - BOOL ret; - - SERVER_START_REQ( get_window_layered_info ) - { - req->handle = wine_server_user_handle( hwnd ); - if ((ret = !wine_server_call_err( req ))) - { - if (key) *key = reply->color_key; - if (alpha) *alpha = reply->alpha; - if (flags) *flags = reply->flags; - } - } - SERVER_END_REQ; - - return ret; -} - - /***************************************************************************** * UpdateLayeredWindowIndirect (USER32.@) */ @@ -4100,7 +4077,7 @@ BOOL WINAPI UpdateLayeredWindowIndirect( HWND hwnd, const UPDATELAYEREDWINDOWINF info->cbSize != sizeof(*info) || info->dwFlags & ~(ULW_COLORKEY | ULW_ALPHA | ULW_OPAQUE | ULW_EX_NORESIZE) || !(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) || - GetLayeredWindowAttributes( hwnd, NULL, NULL, NULL )) + NtUserGetLayeredWindowAttributes( hwnd, NULL, NULL, NULL )) { SetLastError( ERROR_INVALID_PARAMETER ); return FALSE; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index fa2f7e6fede..6bbd6f34756 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -2199,7 +2199,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, /* create or update window surface for top-level windows if the driver doesn't implement WindowPosChanging */ if (!ret && new_surface && !IsRectEmpty( &visible_rect ) && (!(GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) || - GetLayeredWindowAttributes( hwnd, NULL, NULL, NULL ))) + NtUserGetLayeredWindowAttributes( hwnd, NULL, NULL, NULL ))) { window_surface_release( new_surface ); if ((new_surface = win->surface)) window_surface_add_ref( new_surface ); diff --git a/dlls/win32u/Makefile.in b/dlls/win32u/Makefile.in index feb1e6a3eb2..92e1858b9bc 100644 --- a/dlls/win32u/Makefile.in +++ b/dlls/win32u/Makefile.in @@ -37,6 +37,7 @@ C_SRCS = \ syscall.c \ vertical.c \ vulkan.c \ + window.c \ winstation.c \ wrappers.c diff --git a/dlls/win32u/ntgdi_private.h b/dlls/win32u/ntgdi_private.h index b678cd14539..36839cc206f 100644 --- a/dlls/win32u/ntgdi_private.h +++ b/dlls/win32u/ntgdi_private.h @@ -24,10 +24,6 @@ #include <limits.h> #include <math.h> #include <stdlib.h> -#include <stdarg.h> -#include "windef.h" -#include "winbase.h" -#include "ntgdi.h" #include "win32u_private.h" /* extra stock object: default 1x1 bitmap for memory DCs */ diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 77fe84d074a..8b74deb0be7 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -105,6 +105,7 @@ static void * const syscalls[] = NtUserCloseWindowStation, NtUserCreateDesktopEx, NtUserCreateWindowStation, + NtUserGetLayeredWindowAttributes, NtUserGetObjectInformation, NtUserGetProcessWindowStation, NtUserGetThreadDesktop, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index c7cf34ea1ff..5c31b9017ee 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -950,7 +950,7 @@ @ stub NtUserGetKeyboardLayoutList @ stub NtUserGetKeyboardLayoutName @ stub NtUserGetKeyboardState -@ stub NtUserGetLayeredWindowAttributes +@ stdcall -syscall NtUserGetLayeredWindowAttributes(long ptr ptr ptr) @ stub NtUserGetListBoxInfo @ stub NtUserGetMenuBarInfo @ stub NtUserGetMenuIndex diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 9a0a16c1f22..a76bd6f0c16 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -21,9 +21,14 @@ #ifndef __WINE_WIN32U_PRIVATE #define __WINE_WIN32U_PRIVATE -#include "winuser.h" +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "ntgdi.h" +#include "ntuser.h" #include "wine/gdi_driver.h" #include "wine/unixlib.h" +#include "wine/debug.h" struct user_callbacks { diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c new file mode 100644 index 00000000000..03065c1a00a --- /dev/null +++ b/dlls/win32u/window.c @@ -0,0 +1,50 @@ +/* + * Window related functions + * + * Copyright 1993, 1994 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#if 0 +#pragma makedep unix +#endif + +#include "win32u_private.h" +#include "wine/server.h" + + +/***************************************************************************** + * NtUserGetLayeredWindowAttributes (win32u.@) + */ +BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags ) +{ + BOOL ret; + + SERVER_START_REQ( get_window_layered_info ) + { + req->handle = wine_server_user_handle( hwnd ); + if ((ret = !wine_server_call_err( req ))) + { + if (key) *key = reply->color_key; + if (alpha) *alpha = reply->alpha; + if (flags) *flags = reply->flags; + } + } + SERVER_END_REQ; + + return ret; +} diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 8cf27d47aad..7c6f00afe66 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -92,6 +92,7 @@ SYSCALL_ENTRY( NtUserCloseWindowStation ) \ SYSCALL_ENTRY( NtUserCreateDesktopEx ) \ SYSCALL_ENTRY( NtUserCreateWindowStation ) \ + SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \ SYSCALL_ENTRY( NtUserGetObjectInformation ) \ SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserGetThreadDesktop ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index b497b0edbdf..c33ab4e4dff 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -155,3 +155,13 @@ NTSTATUS WINAPI wow64_NtUserSetObjectInformation( UINT *args ) return NtUserSetObjectInformation( handle, index, info, len ); } + +NTSTATUS WINAPI wow64_NtUserGetLayeredWindowAttributes( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + COLORREF *key = get_ptr( &args ); + BYTE *alpha = get_ptr( &args ); + DWORD *flags = get_ptr( &args ); + + return NtUserGetLayeredWindowAttributes( hwnd, key, alpha, flags ); +} diff --git a/include/ntuser.h b/include/ntuser.h index daac994c84d..a9b2ae65dad 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -30,6 +30,7 @@ HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *d ULONG heap_size ); HWINSTA WINAPI NtUserCreateWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK mask, ULONG arg3, ULONG arg4, ULONG arg5, ULONG arg6, ULONG arg7 ); +BOOL WINAPI NtUserGetLayeredWindowAttributes( HWND hwnd, COLORREF *key, BYTE *alpha, DWORD *flags ); BOOL WINAPI NtUserGetObjectInformation( HANDLE handle, INT index, void *info, DWORD len, DWORD *needed ); HWINSTA WINAPI NtUserGetProcessWindowStation(void);
1
0
0
0
Aurélien Inacio : win32u: Use 7-bit ascii for unhandled encodings.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: d5f7ab4c2665e272e1fca43226e152412d68ecd5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d5f7ab4c2665e272e1fca432…
Author: Aurélien Inacio <aur36(a)mailo.com> Date: Tue Nov 2 19:03:46 2021 +0100 win32u: Use 7-bit ascii for unhandled encodings. Signed-off-by: Aurélien Inacio <aur36(a)mailo.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/win32u/opentype.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/win32u/opentype.c b/dlls/win32u/opentype.c index 10234c6d5aa..c206d6dae57 100644 --- a/dlls/win32u/opentype.c +++ b/dlls/win32u/opentype.c @@ -344,8 +344,8 @@ static UINT get_name_record_codepage( enum OPENTYPE_PLATFORM_ID platform, USHORT case TT_NAME_MAC_ENCODING_THAI: return 10021; default: - FIXME( "encoding %u not handled, platform %d.\n", encoding, platform ); - break; + WARN( "default ascii encoding used for encoding %d, platform %d\n", encoding, platform ); + return 20127; } break; case OPENTYPE_PLATFORM_WIN: @@ -366,8 +366,8 @@ static UINT get_name_record_codepage( enum OPENTYPE_PLATFORM_ID platform, USHORT case TT_NAME_WIN_ENCODING_JOHAB: return 1361; default: - FIXME( "encoding %u not handled, platform %d.\n", encoding, platform ); - break; + WARN( "default ascii encoding used for encoding %d, platform %d\n", encoding, platform ); + return 20127; } break; default:
1
0
0
0
Akihiro Sagawa : win32u: Use a real family name as otmpFamilyName for substituted face.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 0d1b8adc9c12045816d56cdf09b7dd2378c3d4b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0d1b8adc9c12045816d56cdf…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Thu Nov 4 23:18:23 2021 +0900 win32u: Use a real family name as otmpFamilyName for substituted face. GetTextFace remains to return the original face name, e.g. MS Shell Dlg. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/font.c | 2 +- dlls/win32u/font.c | 26 +++++++++++++------------- dlls/win32u/ntgdi_private.h | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index a8880c263ae..11150685bcd 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -7822,7 +7822,7 @@ static void test_GetOutlineTextMetrics_subst(void) /* family name */ family_name = (const char*)otm + (UINT_PTR)otm->otmpFamilyName; - todo_wine ok(lstrcmpiA(lf.lfFaceName, family_name), "expected a real family name (e.g. Tahoma), got %s\n", family_name); + ok(lstrcmpiA(lf.lfFaceName, family_name), "expected a real family name (e.g. Tahoma), got %s\n", family_name); HeapFree(GetProcessHeap(), 0, otm); SelectObject(hdc, hfont_old); diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index e1603b3698a..1ac48e67d65 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -1866,7 +1866,7 @@ static struct gdi_font_face *find_any_face( const LOGFONTW *lf, FONTSIGNATURE fs } static struct gdi_font_face *find_matching_face( const LOGFONTW *lf, CHARSETINFO *csi, BOOL can_use_bitmap, - const WCHAR **orig_name ) + BOOL *substituted ) { BOOL want_vertical = (lf->lfFaceName[0] == '@'); struct gdi_font_face *face; @@ -1888,13 +1888,13 @@ static struct gdi_font_face *find_matching_face( const LOGFONTW *lf, CHARSETINFO debugstr_w(subst), (subst_charset != -1) ? subst_charset : lf->lfCharSet ); if (subst_charset != -1) translate_charset_info( (DWORD *)(INT_PTR)subst_charset, csi, TCI_SRCCHARSET ); - *orig_name = lf->lfFaceName; + *substituted = TRUE; } if ((face = find_matching_face_by_name( lf->lfFaceName, subst, lf, csi->fs, can_use_bitmap ))) return face; } - *orig_name = NULL; /* substitution is no longer relevant */ + *substituted = FALSE; /* substitution is no longer relevant */ /* If requested charset was DEFAULT_CHARSET then try using charset corresponding to the current ansi codepage */ @@ -2055,7 +2055,7 @@ static void free_gdi_font( struct gdi_font *font ) static inline const WCHAR *get_gdi_font_name( struct gdi_font *font ) { - return (WCHAR *)font->otm.otmpFamilyName; + return font->use_logfont_name ? font->lf.lfFaceName : (WCHAR *)font->otm.otmpFamilyName; } static struct gdi_font *create_gdi_font( const struct gdi_font_face *face, const WCHAR *family_name, @@ -2481,10 +2481,7 @@ static void create_child_font_list( struct gdi_font *font ) { struct gdi_font_link *font_link; struct gdi_font_link_entry *entry; - const WCHAR* font_name; - - if (!(font_name = get_gdi_font_subst( get_gdi_font_name(font), -1, NULL ))) - font_name = get_gdi_font_name( font ); + const WCHAR* font_name = (WCHAR *)font->otm.otmpFaceName; if ((font_link = find_gdi_font_link( font_name ))) { @@ -3951,6 +3948,7 @@ static BOOL CDECL font_GetTextExtentExPointI( PHYSDEV dev, const WORD *indices, static INT CDECL font_GetTextFace( PHYSDEV dev, INT count, WCHAR *str ) { struct font_physdev *physdev = get_font_dev( dev ); + const WCHAR *font_name; INT len; if (!physdev->font) @@ -3958,10 +3956,11 @@ static INT CDECL font_GetTextFace( PHYSDEV dev, INT count, WCHAR *str ) dev = GET_NEXT_PHYSDEV( dev, pGetTextFace ); return dev->funcs->pGetTextFace( dev, count, str ); } - len = lstrlenW( get_gdi_font_name(physdev->font) ) + 1; + font_name = get_gdi_font_name( physdev->font ); + len = lstrlenW( font_name ) + 1; if (str) { - lstrcpynW( str, get_gdi_font_name(physdev->font), count ); + lstrcpynW( str, font_name, count ); len = min( count, len ); } return len; @@ -4079,7 +4078,7 @@ static struct gdi_font *select_font( LOGFONTW *lf, FMAT2 dcmat, BOOL can_use_bit struct gdi_font_face *face; INT height; CHARSETINFO csi; - const WCHAR *orig_name = NULL; + BOOL substituted = FALSE; static const WCHAR symbolW[] = {'S','y','m','b','o','l',0}; @@ -4095,14 +4094,15 @@ static struct gdi_font *select_font( LOGFONTW *lf, FMAT2 dcmat, BOOL can_use_bit TRACE( "returning cached gdiFont(%p)\n", font ); return font; } - if (!(face = find_matching_face( lf, &csi, can_use_bitmap, &orig_name ))) + if (!(face = find_matching_face( lf, &csi, can_use_bitmap, &substituted ))) { FIXME( "can't find a single appropriate font - bailing\n" ); return NULL; } height = lf->lfHeight; - font = create_gdi_font( face, orig_name, lf ); + font = create_gdi_font( face, NULL, lf ); + font->use_logfont_name = substituted; font->matrix = dcmat; font->can_use_bitmap = can_use_bitmap; if (!csi.fs.fsCsb[0]) get_nearest_charset( face->family->family_name, face, &csi ); diff --git a/dlls/win32u/ntgdi_private.h b/dlls/win32u/ntgdi_private.h index a8a855f5cc4..b678cd14539 100644 --- a/dlls/win32u/ntgdi_private.h +++ b/dlls/win32u/ntgdi_private.h @@ -275,6 +275,7 @@ struct gdi_font BOOL fake_italic : 1; BOOL fake_bold : 1; BOOL scalable : 1; + BOOL use_logfont_name : 1; struct gdi_font *base_font; void *gsub_table; void *vert_feature;
1
0
0
0
Akihiro Sagawa : gdi32/tests: Test substituted face family name.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: 64c31e63b8bec3170b40d98c1e79884c8bcb484e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=64c31e63b8bec3170b40d98c…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Thu Nov 4 23:18:22 2021 +0900 gdi32/tests: Test substituted face family name. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/font.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index f93e5e5e5d0..a8880c263ae 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -7786,6 +7786,51 @@ static void test_select_object(void) DeleteObject(hfont); } +static void test_GetOutlineTextMetrics_subst(void) +{ + OUTLINETEXTMETRICA *otm; + LOGFONTA lf; + HFONT hfont, hfont_old; + HDC hdc; + DWORD ret; + char face_name[LF_FACESIZE]; + const char* family_name; + + if (!is_font_installed("MS SHELL DLG")) + { + skip("MS Shell Dlg is not installed\n"); + return; + } + + hdc = GetDC(0); + memset(&lf, 0, sizeof(lf)); + strcpy(lf.lfFaceName, "MS SHELL DLG"); + lf.lfCharSet = DEFAULT_CHARSET; + hfont = CreateFontIndirectA(&lf); + ok(hfont != NULL, "failed to create a font\n"); + hfont_old = SelectObject(hdc, hfont); + + /* face name */ + ret = GetTextFaceA(hdc, sizeof(face_name), face_name); + ok(ret, "GetTextFace failed\n"); + ok(!lstrcmpiA(lf.lfFaceName, face_name), "expected %s, got %s\n", lf.lfFaceName, face_name); + + ret = GetOutlineTextMetricsA(hdc, 0, NULL); + otm = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ret); + ret = GetOutlineTextMetricsA(hdc, ret, otm); + ok(ret != 0, "GetOutlineTextMetrics failed\n"); + + /* family name */ + family_name = (const char*)otm + (UINT_PTR)otm->otmpFamilyName; + todo_wine ok(lstrcmpiA(lf.lfFaceName, family_name), "expected a real family name (e.g. Tahoma), got %s\n", family_name); + + HeapFree(GetProcessHeap(), 0, otm); + SelectObject(hdc, hfont_old); + DeleteObject(hfont); + + ReleaseDC(0, hdc); +} + START_TEST(font) { static const char *test_names[] = @@ -7818,6 +7863,7 @@ START_TEST(font) test_GetGlyphIndices(); test_GetKerningPairs(); test_GetOutlineTextMetrics(); + test_GetOutlineTextMetrics_subst(); test_SetTextJustification(); test_font_charset(); test_GdiGetCodePage();
1
0
0
0
Connor McAdams : include: Update existing PROPERTYIDs in uiautomationclient.idl.
by Alexandre Julliard
08 Nov '21
08 Nov '21
Module: wine Branch: master Commit: eb745fd01783a7ade0a7f9d36b924b262b10252c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb745fd01783a7ade0a7f9d3…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Sat Nov 6 15:57:21 2021 -0400 include: Update existing PROPERTYIDs in uiautomationclient.idl. Add PROPERTYID definitions from newer versions of Windows headers. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/uiautomationclient.idl | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/include/uiautomationclient.idl b/include/uiautomationclient.idl index ca768ba6d07..a353a63816b 100644 --- a/include/uiautomationclient.idl +++ b/include/uiautomationclient.idl @@ -143,6 +143,70 @@ library UIAutomationClient { const long UIA_IsItemContainerPatternAvailablePropertyId = 30108; const long UIA_IsVirtualizedItemPatternAvailablePropertyId = 30109; const long UIA_IsSynchronizedInputPatternAvailablePropertyId = 30110; + const long UIA_OptimizeForVisualContentPropertyId = 30111; + const long UIA_IsObjectModelPatternAvailablePropertyId = 30112; + const long UIA_AnnotationAnnotationTypeIdPropertyId = 30113; + const long UIA_AnnotationAnnotationTypeNamePropertyId = 30114; + const long UIA_AnnotationAuthorPropertyId = 30115; + const long UIA_AnnotationDateTimePropertyId = 30116; + const long UIA_AnnotationTargetPropertyId = 30117; + const long UIA_IsAnnotationPatternAvailablePropertyId = 30118; + const long UIA_IsTextPattern2AvailablePropertyId = 30119; + const long UIA_StylesStyleIdPropertyId = 30120; + const long UIA_StylesStyleNamePropertyId = 30121; + const long UIA_StylesFillColorPropertyId = 30122; + const long UIA_StylesFillPatternStylePropertyId = 30123; + const long UIA_StylesShapePropertyId = 30124; + const long UIA_StylesFillPatternColorPropertyId = 30125; + const long UIA_StylesExtendedPropertiesPropertyId = 30126; + const long UIA_IsStylesPatternAvailablePropertyId = 30127; + const long UIA_IsSpreadsheetPatternAvailablePropertyId = 30128; + const long UIA_SpreadsheetItemFormulaPropertyId = 30129; + const long UIA_SpreadsheetItemAnnotationObjectsPropertyId = 30130; + const long UIA_SpreadsheetItemAnnotationTypesPropertyId = 30131; + const long UIA_IsSpreadsheetItemPatternAvailablePropertyId = 30132; + const long UIA_Transform2CanZoomPropertyId = 30133; + const long UIA_IsTransformPattern2AvailablePropertyId = 30134; + const long UIA_LiveSettingPropertyId = 30135; + const long UIA_IsTextChildPatternAvailablePropertyId = 30136; + const long UIA_IsDragPatternAvailablePropertyId = 30137; + const long UIA_DragIsGrabbedPropertyId = 30138; + const long UIA_DragDropEffectPropertyId = 30139; + const long UIA_DragDropEffectsPropertyId = 30140; + const long UIA_IsDropTargetPatternAvailablePropertyId = 30141; + const long UIA_DropTargetDropTargetEffectPropertyId = 30142; + const long UIA_DropTargetDropTargetEffectsPropertyId = 30143; + const long UIA_DragGrabbedItemsPropertyId = 30144; + const long UIA_Transform2ZoomLevelPropertyId = 30145; + const long UIA_Transform2ZoomMinimumPropertyId = 30146; + const long UIA_Transform2ZoomMaximumPropertyId = 30147; + const long UIA_FlowsFromPropertyId = 30148; + const long UIA_IsTextEditPatternAvailablePropertyId = 30149; + const long UIA_IsPeripheralPropertyId = 30150; + const long UIA_IsCustomNavigationPatternAvailablePropertyId = 30151; + const long UIA_PositionInSetPropertyId = 30152; + const long UIA_SizeOfSetPropertyId = 30153; + const long UIA_LevelPropertyId = 30154; + const long UIA_AnnotationTypesPropertyId = 30155; + const long UIA_AnnotationObjectsPropertyId = 30156; + const long UIA_LandmarkTypePropertyId = 30157; + const long UIA_LocalizedLandmarkTypePropertyId = 30158; + const long UIA_FullDescriptionPropertyId = 30159; + const long UIA_FillColorPropertyId = 30160; + const long UIA_OutlineColorPropertyId = 30161; + const long UIA_FillTypePropertyId = 30162; + const long UIA_VisualEffectsPropertyId = 30163; + const long UIA_OutlineThicknessPropertyId = 30164; + const long UIA_CenterPointPropertyId = 30165; + const long UIA_RotationPropertyId = 30166; + const long UIA_SizePropertyId = 30167; + const long UIA_IsSelectionPattern2AvailablePropertyId = 30168; + const long UIA_Selection2FirstSelectedItemPropertyId = 30169; + const long UIA_Selection2LastSelectedItemPropertyId = 30170; + const long UIA_Selection2CurrentSelectedItemPropertyId = 30171; + const long UIA_Selection2ItemCountPropertyId = 30172; + const long UIA_HeadingLevelPropertyId = 30173; + const long UIA_IsDialogPropertyId = 30174; /* } */
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
96
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200