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 2022
----- 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
1024 discussions
Start a n
N
ew thread
Jacek Caban : win32u: Partially move WM_SYSCOMMAND implementation from user32.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 12a6f8d49b3defe6d25643db8a7d8fe838e042f2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=12a6f8d49b3defe6d25643db…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 7 15:26:39 2022 +0200 win32u: Partially move WM_SYSCOMMAND implementation from user32. 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/user32/driver.c | 8 +------- dlls/user32/nonclient.c | 7 +------ dlls/win32u/defwnd.c | 16 ++++++++++++++++ dlls/win32u/win32u_private.h | 1 + dlls/win32u/window.c | 2 +- 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index e913897bbbe..934078a32b5 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -69,11 +69,6 @@ static void CDECL nulldrv_UpdateClipboard(void) { } -static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam ) -{ - return -1; -} - /********************************************************************** * Lazy loading user driver @@ -130,7 +125,7 @@ static struct user_driver_funcs lazy_load_driver = NULL, NULL, NULL, - nulldrv_SysCommand, + NULL, NULL, NULL, NULL, @@ -162,7 +157,6 @@ void CDECL __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT v do { if (!driver->p##name) driver->p##name = nulldrv_##name; } while(0) SET_USER_FUNC(UpdateClipboard); - SET_USER_FUNC(SysCommand); #undef SET_USER_FUNC prev = InterlockedCompareExchangePointer( (void **)&USER_Driver, driver, &lazy_load_driver ); diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index a2a49fda27b..25eee85c5a6 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -1540,12 +1540,7 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam ) { TRACE("hwnd %p WM_SYSCOMMAND %lx %lx\n", hwnd, wParam, lParam ); - if (!IsWindowEnabled( hwnd )) return 0; - - if (HOOK_CallHooks( WH_CBT, HCBT_SYSCOMMAND, wParam, lParam, TRUE )) - return 0; - - if (!USER_Driver->pSysCommand( hwnd, wParam, lParam )) + if (!NtUserMessageCall( hwnd, WM_SYSCOMMAND, wParam, lParam, 0, FNID_DEFWINDOWPROC, FALSE )) return 0; switch (wParam & 0xfff0) diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 68ac46c7e8f..22d2b08951d 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -121,6 +121,18 @@ static HICON set_window_icon( HWND hwnd, WPARAM type, HICON icon ) return ret; } +static LRESULT handle_sys_command( HWND hwnd, WPARAM wparam, LPARAM lparam ) +{ + if (!is_window_enabled( hwnd )) return 0; + + if (call_hooks( WH_CBT, HCBT_SYSCOMMAND, wparam, lparam, TRUE )) + return 0; + + if (!user_driver->pSysCommand( hwnd, wparam, lparam )) + return 0; + + return 1; +} LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi ) { @@ -156,6 +168,10 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, case WM_SETICON: result = (LRESULT)set_window_icon( hwnd, wparam, (HICON)lparam ); break; + + case WM_SYSCOMMAND: + result = handle_sys_command( hwnd, wparam, lparam ); + break; } return result; diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index d60cc9cda48..1b1a9e8ee83 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -410,6 +410,7 @@ extern HWND is_current_process_window( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND is_current_thread_window( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL is_iconic( HWND hwnd ) DECLSPEC_HIDDEN; +extern BOOL is_window_enabled( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL is_window_unicode( HWND hwnd ) DECLSPEC_HIDDEN; extern DWORD get_window_long( HWND hwnd, INT offset ) DECLSPEC_HIDDEN; extern BOOL get_window_rect( HWND hwnd, RECT *rect, UINT dpi ) DECLSPEC_HIDDEN; diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 10c6ff4bf89..c5022b814cd 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -808,7 +808,7 @@ BOOL is_window_unicode( HWND hwnd ) } /* see IsWindowEnabled */ -static BOOL is_window_enabled( HWND hwnd ) +BOOL is_window_enabled( HWND hwnd ) { LONG ret;
1
0
0
0
Jacek Caban : win32u: Move IsWindowEnabled implementation from user32.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: c31954dfa7b026bc13960d3c8184ee94e1b4b05c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c31954dfa7b026bc13960d3c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 7 15:26:25 2022 +0200 win32u: Move IsWindowEnabled implementation from user32. 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/user32/win.c | 9 ++------- dlls/win32u/window.c | 13 +++++++++++++ include/ntuser.h | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 0a3f65e5aa4..881825b5510 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -915,14 +915,9 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable ) /*********************************************************************** * IsWindowEnabled (USER32.@) */ -BOOL WINAPI IsWindowEnabled(HWND hWnd) +BOOL WINAPI IsWindowEnabled( HWND hwnd ) { - LONG ret; - - SetLastError(NO_ERROR); - ret = GetWindowLongW( hWnd, GWL_STYLE ); - if (!ret && GetLastError() != NO_ERROR) return FALSE; - return !(ret & WS_DISABLED); + return NtUserCallHwnd( hwnd, NtUserIsWindowEnabled ); } /*********************************************************************** diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 0b826644131..10c6ff4bf89 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -807,6 +807,17 @@ BOOL is_window_unicode( HWND hwnd ) return ret; } +/* see IsWindowEnabled */ +static BOOL is_window_enabled( HWND hwnd ) +{ + LONG ret; + + SetLastError( NO_ERROR ); + ret = get_window_long( hwnd, GWL_STYLE ); + if (!ret && GetLastError() != NO_ERROR) return FALSE; + return !(ret & WS_DISABLED); +} + /* see GetWindowDpiAwarenessContext */ DPI_AWARENESS_CONTEXT get_window_dpi_awareness_context( HWND hwnd ) { @@ -4979,6 +4990,8 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code ) return get_server_window_text( hwnd, NULL, 0 ); case NtUserIsWindow: return is_window( hwnd ); + case NtUserIsWindowEnabled: + return is_window_enabled( hwnd ); case NtUserIsWindowUnicode: return is_window_unicode( hwnd ); case NtUserIsWindowVisible: diff --git a/include/ntuser.h b/include/ntuser.h index 46da835e24b..38cc8f96057 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -198,6 +198,7 @@ enum NtUserGetWindowDpiAwarenessContext, NtUserGetWindowTextLength, NtUserIsWindow, + NtUserIsWindowEnabled, NtUserIsWindowUnicode, NtUserIsWindowVisible, };
1
0
0
0
Jacek Caban : win32u: Move WM_SETICON implementation from user32.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: d32d3b4f315ea20e3df655c79790323439521476 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d32d3b4f315ea20e3df655c7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 7 15:25:11 2022 +0200 win32u: Move WM_SETICON implementation from user32. 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/user32/defwnd.c | 48 +++--------------------------------------------- dlls/user32/driver.c | 7 +------ dlls/win32u/defwnd.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 51 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 0cd00de5410..b477e47f6eb 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -517,53 +517,11 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa case WM_SETICON: { - HICON ret; - WND *wndPtr = WIN_GetPtr( hwnd ); - - switch(wParam) - { - case ICON_SMALL: - ret = wndPtr->hIconSmall; - if (ret && !lParam && wndPtr->hIcon) - { - wndPtr->hIconSmall2 = CopyImage( wndPtr->hIcon, IMAGE_ICON, - GetSystemMetrics( SM_CXSMICON ), - GetSystemMetrics( SM_CYSMICON ), 0 ); - } - else if (lParam && wndPtr->hIconSmall2) - { - DestroyIcon( wndPtr->hIconSmall2 ); - wndPtr->hIconSmall2 = NULL; - } - wndPtr->hIconSmall = (HICON)lParam; - break; - case ICON_BIG: - ret = wndPtr->hIcon; - if (wndPtr->hIconSmall2) - { - DestroyIcon( wndPtr->hIconSmall2 ); - wndPtr->hIconSmall2 = NULL; - } - if (lParam && !wndPtr->hIconSmall) - { - wndPtr->hIconSmall2 = CopyImage( (HICON)lParam, IMAGE_ICON, - GetSystemMetrics( SM_CXSMICON ), - GetSystemMetrics( SM_CYSMICON ), 0 ); - } - wndPtr->hIcon = (HICON)lParam; - break; - default: - ret = 0; - break; - } - WIN_ReleasePtr( wndPtr ); - - USER_Driver->pSetWindowIcon( hwnd, wParam, (HICON)lParam ); - + LRESULT res = NtUserMessageCall( hwnd, msg, wParam, lParam, + 0, FNID_DEFWINDOWPROC, FALSE ); if( (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CAPTION) == WS_CAPTION ) NC_HandleNCPaint( hwnd , (HRGN)1 ); /* Repaint caption */ - - return (LRESULT)ret; + return res; } case WM_GETICON: diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index 8d356139c11..e913897bbbe 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -69,10 +69,6 @@ static void CDECL nulldrv_UpdateClipboard(void) { } -static void CDECL nulldrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon ) -{ -} - static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam ) { return -1; @@ -130,7 +126,7 @@ static struct user_driver_funcs lazy_load_driver = NULL, NULL, NULL, - nulldrv_SetWindowIcon, + NULL, NULL, NULL, NULL, @@ -166,7 +162,6 @@ void CDECL __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT v do { if (!driver->p##name) driver->p##name = nulldrv_##name; } while(0) SET_USER_FUNC(UpdateClipboard); - SET_USER_FUNC(SetWindowIcon); SET_USER_FUNC(SysCommand); #undef SET_USER_FUNC diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 314f8ea1d13..68ac46c7e8f 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -74,6 +74,54 @@ static BOOL set_window_text( HWND hwnd, const void *text, BOOL ansi ) return TRUE; } +static HICON set_window_icon( HWND hwnd, WPARAM type, HICON icon ) +{ + HICON ret = 0; + WND *win; + + if (!(win = get_win_ptr( hwnd ))) return 0; + + switch (type) + { + case ICON_SMALL: + ret = win->hIconSmall; + if (ret && !icon && win->hIcon && user_callbacks) + { + win->hIconSmall2 = user_callbacks->pCopyImage( win->hIcon, IMAGE_ICON, + get_system_metrics( SM_CXSMICON ), + get_system_metrics( SM_CYSMICON ), 0 ); + } + else if (icon && win->hIconSmall2) + { + NtUserDestroyCursor( win->hIconSmall2, 0 ); + win->hIconSmall2 = NULL; + } + win->hIconSmall = icon; + break; + + case ICON_BIG: + ret = win->hIcon; + if (win->hIconSmall2) + { + NtUserDestroyCursor( win->hIconSmall2, 0 ); + win->hIconSmall2 = NULL; + } + if (icon && !win->hIconSmall && user_callbacks) + { + win->hIconSmall2 = user_callbacks->pCopyImage( icon, IMAGE_ICON, + get_system_metrics( SM_CXSMICON ), + get_system_metrics( SM_CYSMICON ), 0 ); + } + win->hIcon = icon; + break; + } + release_win_ptr( win ); + + user_driver->pSetWindowIcon( hwnd, type, icon ); + return ret; +} + + LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi ) { LRESULT result = 0; @@ -104,6 +152,10 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, case WM_SETTEXT: result = set_window_text( hwnd, (void *)lparam, ansi ); break; + + case WM_SETICON: + result = (LRESULT)set_window_icon( hwnd, wparam, (HICON)lparam ); + break; } return result;
1
0
0
0
Jacek Caban : win32u: Move default window text setting to from user32.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 27cfcaa277764127a28368f8315f7c26cb326f7a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27cfcaa277764127a28368f8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 7 15:24:55 2022 +0200 win32u: Move default window text setting to from user32. 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/user32/defwnd.c | 112 +++---------------------------------------- dlls/user32/driver.c | 7 +-- dlls/user32/user_main.c | 1 - dlls/win32u/Makefile.in | 1 + dlls/win32u/defwnd.c | 110 ++++++++++++++++++++++++++++++++++++++++++ dlls/win32u/message.c | 2 + dlls/win32u/tests/win32u.c | 34 +++++++++++++ dlls/win32u/win32u_private.h | 4 ++ dlls/win32u/window.c | 2 + include/ntuser.h | 1 + 10 files changed, 162 insertions(+), 112 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=27cfcaa277764127a283…
1
0
0
0
Jacek Caban : win32u: Improve string duplication helpers.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: b7f108ed9c91c91adf0f3ce0d5806b1c3e7625e0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b7f108ed9c91c91adf0f3ce0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 7 15:24:25 2022 +0200 win32u: Improve string duplication helpers. 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/font.c | 37 ++++++++++++++++++++++--------------- dlls/win32u/freetype.c | 22 ++-------------------- dlls/win32u/win32u_private.h | 28 +++++++++++++++++++++++----- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index 87ef75f04af..2bf68141d6d 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -277,15 +277,6 @@ static inline INT INTERNAL_YWSTODS(DC *dc, INT height) return pt[1].y - pt[0].y; } -static inline WCHAR *strdupW( const WCHAR *p ) -{ - WCHAR *ret; - DWORD len = (lstrlenW(p) + 1) * sizeof(WCHAR); - ret = malloc( len ); - memcpy(ret, p, len); - return ret; -} - static INT FONT_GetObjectW( HGDIOBJ handle, INT count, LPVOID buffer ); static BOOL FONT_DeleteObject( HGDIOBJ handle ); @@ -1201,8 +1192,8 @@ static struct gdi_font_face *create_face( struct gdi_font_family *family, const struct gdi_font_face *face = calloc( 1, sizeof(*face) ); face->refcount = 1; - face->style_name = strdupW( style ); - face->full_name = strdupW( fullname ); + face->style_name = wcsdup( style ); + face->full_name = wcsdup( fullname ); face->face_index = index; face->fs = fs; face->ntmFlags = ntmflags; @@ -1210,7 +1201,7 @@ static struct gdi_font_face *create_face( struct gdi_font_family *family, const face->flags = flags; face->data_ptr = data_ptr; face->data_size = data_size; - if (file) face->file = strdupW( file ); + if (file) face->file = wcsdup( file ); if (size) face->size = *size; else face->scalable = TRUE; if (insert_face_in_family_list( face, family )) return face; @@ -2075,9 +2066,9 @@ static struct gdi_font *create_gdi_font( const struct gdi_font_face *face, const font->ntmFlags = face->ntmFlags; font->aa_flags = HIWORD( face->flags ); if (!family_name) family_name = face->family->family_name; - font->otm.otmpFamilyName = (char *)strdupW( family_name ); - font->otm.otmpStyleName = (char *)strdupW( face->style_name ); - font->otm.otmpFaceName = (char *)strdupW( face->full_name ); + font->otm.otmpFamilyName = (char *)wcsdup( family_name ); + font->otm.otmpStyleName = (char *)wcsdup( face->style_name ); + font->otm.otmpFaceName = (char *)wcsdup( face->full_name ); return font; } @@ -3311,6 +3302,22 @@ DWORD win32u_mbtowc( CPTABLEINFO *info, WCHAR *dst, DWORD dstlen, const char *sr if (!info && !(info = get_cptable( get_acp() ))) return 0; + if (!dst) + { + /* only compute length */ + if (info->DBCSOffsets) + { + for (ret = 0; srclen--; src++, ret++) + { + if (!info->DBCSOffsets[(unsigned char)*src]) continue; + if (!srclen--) break; + src++; + } + } + else ret = srclen; + return ret * sizeof(WCHAR); + } + dstlen /= sizeof(WCHAR); if (info->DBCSOffsets) { diff --git a/dlls/win32u/freetype.c b/dlls/win32u/freetype.c index b6063a14570..0703d32740e 100644 --- a/dlls/win32u/freetype.c +++ b/dlls/win32u/freetype.c @@ -584,24 +584,6 @@ static BOOL is_subpixel_rendering_enabled( void ) } -static LPWSTR strdupW(LPCWSTR p) -{ - LPWSTR ret; - DWORD len = (lstrlenW(p) + 1) * sizeof(WCHAR); - ret = malloc( len ); - memcpy(ret, p, len); - return ret; -} - -static WCHAR *towstr(const char *str) -{ - DWORD len = strlen(str) + 1; - WCHAR *wstr = malloc( len * sizeof(WCHAR) ); - win32u_mbtowc( NULL, wstr, len * sizeof(WCHAR), str, len ); - return wstr; -} - - static const LANGID mac_langid_table[] = { MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT), /* TT_MAC_LANGID_ENGLISH */ @@ -1168,7 +1150,7 @@ static WCHAR *decode_opentype_name( struct opentype_name *name ) if (len == ARRAY_SIZE(buffer)) WARN("Truncated font name %s -> %s\n", debugstr_an(name->bytes, name->length), debugstr_w(buffer)); else buffer[len] = 0; - return strdupW( buffer ); + return wcsdup( buffer ); } struct unix_face @@ -3687,7 +3669,7 @@ static BOOL freetype_set_outline_text_metrics( struct gdi_font *font ) { static const WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0}; FIXME("failed to read full_nameW for font %s!\n", wine_dbgstr_w((WCHAR *)font->otm.otmpFamilyName)); - font->otm.otmpFullName = (char *)strdupW(fake_nameW); + font->otm.otmpFullName = (char *)wcsdup( fake_nameW ); } needed = sizeof(font->otm) + (lstrlenW( (WCHAR *)font->otm.otmpFamilyName ) + 1 + lstrlenW( (WCHAR *)font->otm.otmpStyleName ) + 1 + diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 874cc92f4d4..3af6a9409d6 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -571,7 +571,30 @@ static inline ULONG win32u_wcstoul( const WCHAR *s, WCHAR **end, int base ) return negative ? -ret : ret; } +DWORD win32u_mbtowc( CPTABLEINFO *info, WCHAR *dst, DWORD dstlen, const char *src, + DWORD srclen ) DECLSPEC_HIDDEN; +DWORD win32u_wctomb( CPTABLEINFO *info, char *dst, DWORD dstlen, const WCHAR *src, + DWORD srclen ) DECLSPEC_HIDDEN; + +static inline WCHAR *win32u_wcsdup( const WCHAR *str ) +{ + DWORD size = (lstrlenW( str ) + 1) * sizeof(WCHAR); + WCHAR *ret = malloc( size ); + if (ret) memcpy( ret, str, size ); + return ret; +} + +static inline WCHAR *towstr( const char *str ) +{ + DWORD len = strlen( str ) + 1; + DWORD size = win32u_mbtowc( NULL, NULL, 0, str, len ); + WCHAR *ret = malloc( size ); + if (ret) win32u_mbtowc( NULL, ret, size, str, len ); + return ret; +} + #define towupper(c) win32u_towupper(c) +#define wcsdup(s) win32u_wcsdup(s) #define wcstol(s,e,b) win32u_wcstol(s,e,b) #define wcstoul(s,e,b) win32u_wcstoul(s,e,b) @@ -587,11 +610,6 @@ static inline UINT asciiz_to_unicode( WCHAR *dst, const char *src ) return (p - dst) * sizeof(WCHAR); } -DWORD win32u_mbtowc( CPTABLEINFO *info, WCHAR *dst, DWORD dstlen, const char *src, - DWORD srclen ) DECLSPEC_HIDDEN; -DWORD win32u_wctomb( CPTABLEINFO *info, char *dst, DWORD dstlen, const WCHAR *src, - DWORD srclen ) DECLSPEC_HIDDEN; - static inline BOOL is_win9x(void) { return NtCurrentTeb()->Peb->OSPlatformId == VER_PLATFORM_WIN32s;
1
0
0
0
Nikolay Sivov : d3drm: Build without -DWINE_NO_LONG_TYPES.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: c699803ff09a705f6506f88e6f8ed221b4d04965 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c699803ff09a705f6506f88e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Apr 7 14:59:43 2022 +0300 d3drm: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3drm/Makefile.in | 1 - dlls/d3drm/d3drm.c | 56 ++++++++-------- dlls/d3drm/device.c | 50 +++++++-------- dlls/d3drm/face.c | 36 +++++------ dlls/d3drm/frame.c | 82 ++++++++++++------------ dlls/d3drm/light.c | 8 +-- dlls/d3drm/material.c | 6 +- dlls/d3drm/meshbuilder.c | 162 +++++++++++++++++++++++------------------------ dlls/d3drm/texture.c | 52 +++++++-------- dlls/d3drm/viewport.c | 30 ++++----- 10 files changed, 241 insertions(+), 242 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=c699803ff09a705f6506…
1
0
0
0
Georg Lehmann : winevulkan: Update to VK spec version 1.3.211.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 343ddade5e0486790344195bd4f949228a3b3173 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=343ddade5e0486790344195b…
Author: Georg Lehmann <dadschoorse(a)gmail.com> Date: Thu Apr 7 12:26:41 2022 +0200 winevulkan: Update to VK spec version 1.3.211. Signed-off-by: Georg Lehmann <dadschoorse(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 2 +- dlls/winevulkan/vulkan_thunks.c | 18 ++++++++++++++++++ dlls/winevulkan/winevulkan.json | 2 +- include/wine/vulkan.h | 14 +++++++++++++- 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 505aaa81c60..c26951d06b9 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -64,7 +64,7 @@ from enum import Enum LOGGER = logging.Logger("vulkan") LOGGER.addHandler(logging.StreamHandler()) -VK_XML_VERSION = "1.3.210" +VK_XML_VERSION = "1.3.211" WINE_VK_VERSION = (1, 3) # Filenames to create. diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index b04beb4399e..ab9ee691986 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -4514,6 +4514,23 @@ VkResult convert_VkDeviceCreateInfo_struct_chain(const void *pNext, VkDeviceCrea break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: + { + const VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *in = (const VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)in_header; + VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *out; + + if (!(out = malloc(sizeof(*out)))) goto out_of_memory; + + out->sType = in->sType; + out->pNext = NULL; + out->image2DViewOf3D = in->image2DViewOf3D; + out->sampler2DViewOf3D = in->sampler2DViewOf3D; + + out_header->pNext = (VkBaseOutStructure *)out; + out_header = out_header->pNext; + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE: { const VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *in = (const VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)in_header; @@ -9686,6 +9703,7 @@ static const char * const vk_device_extensions[] = "VK_EXT_global_priority_query", "VK_EXT_graphics_pipeline_library", "VK_EXT_host_query_reset", + "VK_EXT_image_2d_view_of_3d", "VK_EXT_image_robustness", "VK_EXT_image_view_min_lod", "VK_EXT_index_type_uint8", diff --git a/dlls/winevulkan/winevulkan.json b/dlls/winevulkan/winevulkan.json index 7d14e2ddf6d..2345547ff1d 100644 --- a/dlls/winevulkan/winevulkan.json +++ b/dlls/winevulkan/winevulkan.json @@ -2,6 +2,6 @@ "file_format_version": "1.0.0", "ICD": { "library_path": ".\\winevulkan.dll", - "api_version": "1.3.210" + "api_version": "1.3.211" } } diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h index 7ec94394d4d..2a7a02db636 100644 --- a/include/wine/vulkan.h +++ b/include/wine/vulkan.h @@ -487,6 +487,8 @@ #define VK_EXT_IMAGE_VIEW_MIN_LOD_EXTENSION_NAME "VK_EXT_image_view_min_lod" #define VK_EXT_MULTI_DRAW_SPEC_VERSION 1 #define VK_EXT_MULTI_DRAW_EXTENSION_NAME "VK_EXT_multi_draw" +#define VK_EXT_IMAGE_2D_VIEW_OF_3D_SPEC_VERSION 1 +#define VK_EXT_IMAGE_2D_VIEW_OF_3D_EXTENSION_NAME "VK_EXT_image_2d_view_of_3d" #define VK_KHR_PORTABILITY_ENUMERATION_SPEC_VERSION 1 #define VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME "VK_KHR_portability_enumeration" #define VK_EXT_LOAD_STORE_OP_NONE_SPEC_VERSION 1 @@ -525,7 +527,7 @@ #define VK_API_VERSION_1_1 VK_MAKE_API_VERSION(0, 1, 1, 0) #define VK_API_VERSION_1_2 VK_MAKE_API_VERSION(0, 1, 2, 0) #define VK_API_VERSION_1_3 VK_MAKE_API_VERSION(0, 1, 3, 0) -#define VK_HEADER_VERSION 210 +#define VK_HEADER_VERSION 211 #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION) #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; #define VK_USE_64_BIT_PTR_DEFINES 0 @@ -2252,6 +2254,7 @@ typedef enum VkImageCreateFlagBits VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV = 0x00002000, VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT = 0x00004000, VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 0x00008000, + VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000, VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, @@ -3765,6 +3768,7 @@ typedef enum VkStructureType VK_STRUCTURE_TYPE_IMAGE_VIEW_MIN_LOD_CREATE_INFO_EXT = 1000391001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT = 1000393000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BORDER_COLOR_SWIZZLE_FEATURES_EXT = 1000411000, VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000, @@ -6561,6 +6565,14 @@ typedef struct VkPhysicalDeviceIDProperties } VkPhysicalDeviceIDProperties; typedef VkPhysicalDeviceIDProperties VkPhysicalDeviceIDPropertiesKHR; +typedef struct VkPhysicalDeviceImage2DViewOf3DFeaturesEXT +{ + VkStructureType sType; + void *pNext; + VkBool32 image2DViewOf3D; + VkBool32 sampler2DViewOf3D; +} VkPhysicalDeviceImage2DViewOf3DFeaturesEXT; + typedef struct VkPhysicalDeviceImageFormatInfo2 { VkStructureType sType;
1
0
0
0
Alexandre Julliard : xslt: Import upstream release 1.1.35.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: f3f7dd4dba6e96bd6652f2c3acad7e4ce1cdf353 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f3f7dd4dba6e96bd6652f2c3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 7 12:25:14 2022 +0200 xslt: Import upstream release 1.1.35. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/xslt/libxslt/extensions.c | 6 - libs/xslt/libxslt/extensions.h | 2 +- libs/xslt/libxslt/functions.c | 14 +- libs/xslt/libxslt/numbers.c | 4 +- libs/xslt/libxslt/pattern.c | 464 ++++++++++++++++---------------------- libs/xslt/libxslt/preproc.c | 2 + libs/xslt/libxslt/preproc.h | 2 +- libs/xslt/libxslt/security.c | 2 +- libs/xslt/libxslt/templates.c | 8 + libs/xslt/libxslt/transform.c | 124 +--------- libs/xslt/libxslt/xslt.c | 8 +- libs/xslt/libxslt/xsltInternals.h | 26 ++- libs/xslt/libxslt/xsltconfig.h | 6 +- libs/xslt/libxslt/xsltlocale.c | 3 +- libs/xslt/libxslt/xsltutils.c | 59 ++++- 15 files changed, 304 insertions(+), 426 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f3f7dd4dba6e96bd6652…
1
0
0
0
Alexandre Julliard : xml2: Import upstream release 2.9.13.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: a279c2783c8cc664921de99d55725784b57074e7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a279c2783c8cc664921de99d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 7 12:21:04 2022 +0200 xml2: Import upstream release 2.9.13. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/xml2/HTMLparser.c | 59 +++++++++++------------ libs/xml2/HTMLtree.c | 52 +++++++++++++-------- libs/xml2/SAX2.c | 31 ++++++------ libs/xml2/catalog.c | 2 + libs/xml2/elfgcchack.h | 12 +++++ libs/xml2/encoding.c | 32 ++++++------- libs/xml2/hash.c | 22 ++++----- libs/xml2/include/libxml/xmlversion.h | 12 ++--- libs/xml2/parser.c | 29 ++++++------ libs/xml2/parserInternals.c | 4 +- libs/xml2/relaxng.c | 2 + libs/xml2/tree.c | 39 ++++++++++------ libs/xml2/uri.c | 15 +++--- libs/xml2/valid.c | 88 ++++++++++++++++++++++------------- libs/xml2/xinclude.c | 14 +++--- libs/xml2/xmlIO.c | 22 +++++++-- libs/xml2/xmlmemory.c | 2 +- libs/xml2/xmlregexp.c | 9 +++- libs/xml2/xmlsave.c | 31 ++++++++---- libs/xml2/xmlschemas.c | 12 +++-- libs/xml2/xmlschemastypes.c | 15 ++++-- libs/xml2/xmlstring.c | 73 +++++++++++++++-------------- libs/xml2/xpath.c | 6 ++- libs/xml2/xpointer.c | 68 +++++++++++---------------- 24 files changed, 373 insertions(+), 278 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a279c2783c8cc664921d…
1
0
0
0
Alexandre Julliard : make_unicode: Update to CLDR version 41.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 6644b6b667e23e315a60758297b96f415346cfb2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6644b6b667e23e315a607582…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 7 12:07:58 2022 +0200 make_unicode: Update to CLDR version 41. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- nls/locale.nls | Bin 663852 -> 664228 bytes tools/make_unicode | 7 +++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nls/locale.nls b/nls/locale.nls index aee79e4cb11..2ab7ce55dc9 100644 Binary files a/nls/locale.nls and b/nls/locale.nls differ diff --git a/tools/make_unicode b/tools/make_unicode index dd96b13d6df..520cbe0f1a5 100755 --- a/tools/make_unicode +++ b/tools/make_unicode @@ -33,8 +33,7 @@ my $REPORTS = "
http://www.unicode.org/reports
"; my $MSDATA = "
https://download.microsoft.com/download/C/F/7/CF713A5E-9FBC-4FD6-9246-275F6…
"; my $MSCODEPAGES = "$MSDATA/Windows Supported Code Page Data Files.zip"; -#my $CLDRDATA = "
https://www.unicode.org/Public/cldr/40/cldr-common-40.0.zip
"; -my $CLDRVERSION = "40"; +my $CLDRVERSION = "41"; my $CLDRDATA = "
https://github.com/unicode-org/cldr/archive/refs/tags/release-$CLDRVERSION.…
"; my $CLDR33DATA = "
https://www.unicode.org/Public/cldr/33/cldr-common-33.0.zip
"; @@ -987,8 +986,8 @@ my @locales = { name => "ks", lcid => 0x00000060, group => 15, sabbrevlangname => "ZZZ", sopentypelang => "KSH" }, { name => "ks-Arab", lcid => 0x00000460 }, { name => "ks-Arab-IN" }, - { name => "ks-Deva", slist => ",", dir => "seed" }, - { name => "ks-Deva-IN", lcid => 0x00000860, dir => "seed" }, + { name => "ks-Deva", slist => "," }, + { name => "ks-Deva-IN", lcid => 0x00000860 }, { name => "ks-IN", alias => "ks-Arab-IN" }, { name => "ksb" }, { name => "ksb-TZ" },
1
0
0
0
← Newer
1
...
79
80
81
82
83
84
85
...
103
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
97
98
99
100
101
102
103
Results per page:
10
25
50
100
200