winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
667 discussions
Start a n
N
ew thread
Jacek Caban : win32u: Remove no longer needed NtUserWinProcResult.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: c1a5b42cdca2e9396ea2bbe53855d9f03899b2ff URL:
https://gitlab.winehq.org/wine/wine/-/commit/c1a5b42cdca2e9396ea2bbe53855d9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jul 19 00:28:34 2023 +0200 win32u: Remove no longer needed NtUserWinProcResult. --- dlls/user32/winproc.c | 63 +-------------------------------------------------- dlls/win32u/message.c | 21 +---------------- dlls/wow64win/user.c | 7 ------ include/ntuser.h | 3 +-- 4 files changed, 3 insertions(+), 91 deletions(-) diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 3ebe1eb2d8c..b1193773ed2 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -926,73 +926,12 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size ) result = dispatch_win_proc_params( params ); - switch (params->msg) - { - case WM_NCCREATE: - case WM_CREATE: - case WM_NCCALCSIZE: - case WM_GETTEXT: - case WM_ASKCBFORMATNAME: - case WM_WININICHANGE: - case WM_SETTEXT: - case WM_DEVMODECHANGE: - case CB_DIR: - case LB_DIR: - case LB_ADDFILE: - case EM_REPLACESEL: - case WM_GETMINMAXINFO: - case WM_MEASUREITEM: - case WM_DELETEITEM: - case WM_COMPAREITEM: - case WM_WINDOWPOSCHANGING: - case WM_WINDOWPOSCHANGED: - case WM_COPYDATA: - case WM_HELP: - case WM_STYLECHANGING: - case WM_STYLECHANGED: - case WM_GETDLGCODE: - case SBM_SETSCROLLINFO: - case SBM_GETSCROLLINFO: - case SBM_GETSCROLLBARINFO: - case EM_GETSEL: - case SBM_GETRANGE: - case CB_GETEDITSEL: - case EM_GETRECT: - case LB_GETITEMRECT: - case CB_GETDROPPEDCONTROLRECT: - case EM_SETRECT: - case EM_SETRECTNP: - case EM_GETLINE: - case EM_SETTABSTOPS: - case LB_SETTABSTOPS: - case CB_ADDSTRING: - case CB_INSERTSTRING: - case CB_FINDSTRING: - case CB_FINDSTRINGEXACT: - case CB_SELECTSTRING: - case LB_ADDSTRING: - case LB_INSERTSTRING: - case LB_FINDSTRING: - case LB_FINDSTRINGEXACT: - case LB_SELECTSTRING: - case CB_GETLBTEXT: - case LB_GETTEXT: - case LB_GETSELITEMS: - case WM_NEXTMENU: - case WM_SIZING: - case WM_MOVING: - case WM_MDICREATE: - case CB_GETCOMBOBOXINFO: - case WM_MDIGETACTIVE: + if (size) { LRESULT *result_ptr = (LRESULT *)buffer - 1; *result_ptr = result; return NtCallbackReturn( result_ptr, sizeof(*result_ptr) + size, TRUE ); } - } - - NtUserMessageCall( params->hwnd, params->msg, params->wparam, params->lparam, - (void *)result, NtUserWinProcResult, FALSE ); } else { diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 80802f6425f..28a2b7d39cc 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -57,8 +57,6 @@ struct received_message_info struct received_message_info *prev; }; -#define MSG_CLIENT_MESSAGE 0xff - struct packed_hook_extra_info { user_handle_t handle; @@ -1971,7 +1969,6 @@ BOOL reply_message_result( LRESULT result ) struct user_thread_info *thread_info = get_user_thread_info(); struct received_message_info *info = thread_info->receive_info; - while (info && info->type == MSG_CLIENT_MESSAGE) info = info->prev; if (!info) return FALSE; reply_message( info, result, NULL ); return TRUE; @@ -1989,7 +1986,6 @@ static BOOL reply_winproc_result( LRESULT result, HWND hwnd, UINT message, WPARA MSG msg; if (!info) return FALSE; - if (info->type == MSG_CLIENT_MESSAGE) return TRUE; msg.hwnd = hwnd; msg.message = message; @@ -3595,8 +3591,6 @@ static BOOL broadcast_message( struct send_message_info *info, DWORD_PTR *res_pt static BOOL process_packed_message( struct send_message_info *info, LRESULT *res_ptr, BOOL ansi ) { - struct user_thread_info *thread_info = get_user_thread_info(); - struct received_message_info receive_info; struct packed_message data; size_t buffer_size = 0, i; void *buffer = NULL; @@ -3613,19 +3607,9 @@ static BOOL process_packed_message( struct send_message_info *info, LRESULT *res ptr += data.size[i]; } - receive_info.type = MSG_CLIENT_MESSAGE; - receive_info.msg.hwnd = info->hwnd; - receive_info.msg.message = info->msg; - receive_info.msg.wParam = info->wparam; - receive_info.msg.lParam = info->lparam; - receive_info.flags = 0; - receive_info.prev = thread_info->receive_info; - thread_info->receive_info = &receive_info; - *res_ptr = call_window_proc( info->hwnd, info->msg, info->wparam, info->lparam, !ansi, TRUE, info->wm_char, TRUE, buffer, buffer_size ); - if (thread_info->receive_info == &receive_info) - thread_info->receive_info = receive_info.prev; + free( buffer ); return TRUE; } @@ -4273,9 +4257,6 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa case NtUserClipboardWindowProc: return user_driver->pClipboardWindowProc( hwnd, msg, wparam, lparam ); - case NtUserWinProcResult: - return reply_winproc_result( (LRESULT)result_info, hwnd, msg, wparam, lparam ); - case NtUserGetDispatchParams: if (!hwnd) return FALSE; if (init_window_call_params( result_info, hwnd, msg, wparam, lparam, diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 28c6fa9b6d4..e593da7ba53 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -3552,13 +3552,6 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args ) /* no argument conversion */ return NtUserMessageCall( hwnd, msg, wparam, lparam, result_info, type, ansi ); - case NtUserWinProcResult: - { - LONG result32 = PtrToLong( result_info ); - return message_call_32to64( hwnd, msg, wparam, lparam, - LongToPtr( result32 ), type, ansi ); - } - case NtUserImeDriverCall: { struct diff --git a/include/ntuser.h b/include/ntuser.h index 9077ebbb589..110aa3a3c54 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -306,8 +306,7 @@ enum NtUserSpyGetMsgName = 0x3003, NtUserSpyEnter = 0x0304, NtUserSpyExit = 0x0305, - NtUserWinProcResult = 0x0306, - NtUserImeDriverCall = 0x0307, + NtUserImeDriverCall = 0x0306, }; /* NtUserThunkedMenuItemInfo codes */
1
0
0
0
Jacek Caban : win32u: Use user message packing for WM_MDIGETACTIVE.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: ad45d84a6535712d32cc7e24622e69f05c2f73d0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ad45d84a6535712d32cc7e24622e69…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jul 19 00:26:53 2023 +0200 win32u: Use user message packing for WM_MDIGETACTIVE. --- dlls/user32/hook.c | 8 +++----- dlls/user32/user_private.h | 2 +- dlls/user32/winproc.c | 47 +++++++++++++--------------------------------- dlls/win32u/message.c | 37 ++++++++++-------------------------- dlls/win32u/tests/win32u.c | 7 ------- dlls/wow64win/user.c | 1 + 6 files changed, 28 insertions(+), 74 deletions(-)
1
0
0
0
Jacek Caban : win32u: Use user message packing for CB_GETCOMBOBOXINFO.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: 8561e8e9585bbf18f7cc2e208b4acb821a2438ba URL:
https://gitlab.winehq.org/wine/wine/-/commit/8561e8e9585bbf18f7cc2e208b4acb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jul 19 00:14:31 2023 +0200 win32u: Use user message packing for CB_GETCOMBOBOXINFO. --- dlls/user32/winproc.c | 2 ++ dlls/win32u/message.c | 19 +++++++++++++++--- dlls/win32u/tests/win32u.c | 18 ++++++++++++++++- dlls/wow64win/user.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 4 deletions(-) diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 217b02f70ad..3d8e6833602 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -857,6 +857,7 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam, case WM_NEXTMENU: case WM_SIZING: case WM_MOVING: + case CB_GETCOMBOBOXINFO: break; case WM_MDIGETACTIVE: if (!*lparam) return TRUE; @@ -1001,6 +1002,7 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size ) case WM_SIZING: case WM_MOVING: case WM_MDICREATE: + case CB_GETCOMBOBOXINFO: { LRESULT *result_ptr = (LRESULT *)buffer - 1; *result_ptr = result; diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 9ca3eab23b6..1dcacf66f38 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -1696,6 +1696,9 @@ size_t user_message_size( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, if (!IS_INTRESOURCE(mcs->szTitle)) size += string_size( mcs->szTitle, ansi ); break; } + case CB_GETCOMBOBOXINFO: + size = sizeof(COMBOBOXINFO); + break; } return size; @@ -1782,6 +1785,9 @@ void pack_user_message( void *buffer, size_t size, UINT message, } return; } + case CB_GETCOMBOBOXINFO: + memset( buffer, 0, size ); + return; } if (size) memcpy( buffer, lparam_ptr, size ); @@ -1892,6 +1898,16 @@ static void copy_user_result( void *buffer, size_t size, LRESULT result, UINT me case WM_NEXTMENU: copy_size = sizeof(MDINEXTMENU); break; + case CB_GETCOMBOBOXINFO: + if (sizeof(void *) == 4) + { + COMBOBOXINFO *cbi = lparam_ptr; + memcpy( cbi, buffer, size ); + cbi->cbSize = sizeof(*cbi); + return; + } + copy_size = sizeof(COMBOBOXINFO); + break; default: return; } @@ -1912,9 +1928,6 @@ static void copy_reply( LRESULT result, HWND hwnd, UINT message, WPARAM wparam, switch(message) { - case CB_GETCOMBOBOXINFO: - copy_size = sizeof(COMBOBOXINFO); - break; case WM_MDIGETACTIVE: if (lparam) copy_size = sizeof(BOOL); break; diff --git a/dlls/win32u/tests/win32u.c b/dlls/win32u/tests/win32u.c index 0acea87ac10..b82e7d80687 100644 --- a/dlls/win32u/tests/win32u.c +++ b/dlls/win32u/tests/win32u.c @@ -1362,6 +1362,7 @@ struct lparam_hook_test const void *lparam; const void *change_lparam; const void *check_lparam; + const void *default_lparam; size_t lparam_size; size_t lparam_init_size; size_t check_size; @@ -1424,7 +1425,13 @@ static void check_params( const struct lparam_hook_test *test, UINT message, default: if (test->check_size) { - const void *expected = is_ret && test->change_lparam ? test->change_lparam : test->lparam; + const void *expected; + if (is_ret && test->change_lparam) + expected = test->change_lparam; + else if (test->default_lparam) + expected = test->default_lparam; + else + expected = test->lparam; ok( !memcmp( (const void *)lparam, expected, test->check_size ), "unexpected lparam content\n" ); } } @@ -1685,6 +1692,10 @@ static void test_wndproc_hook(void) static const MDINEXTMENU nm_in = { .hmenuIn = (HMENU)0xdeadbeef }; static const MDINEXTMENU nm_out = { .hmenuIn = (HMENU)1 }; static const MDICREATESTRUCTW mcs_in = { .x = 1, .y = 2 }; + static const COMBOBOXINFO cbi_in = {}; + static const COMBOBOXINFO cbi_out = { .hwndList = (HWND)2 }; + static const COMBOBOXINFO cbi_ret = { .hwndList = (HWND)2, + .cbSize = sizeof(void *) == 4 ? sizeof(cbi_in) : 0 }; static const struct lparam_hook_test lparam_hook_tests[] = { @@ -1914,6 +1925,11 @@ static void test_wndproc_hook(void) .lparam_size = sizeof(mcs_in), .lparam = &mcs_in, .poison_lparam = TRUE, .check_size = sizeof(mcs_in), }, + { + "CB_GETCOMBOBOXINFO", CB_GETCOMBOBOXINFO, + .lparam_size = sizeof(cbi_in), .change_lparam = &cbi_out, .default_lparam = &cbi_in, + .check_lparam = &cbi_ret, + }, /* messages that don't change lparam */ { "WM_USER", WM_USER }, { "WM_NOTIFY", WM_NOTIFY }, diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 6e86056cdb8..70f91c8210b 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -251,6 +251,17 @@ typedef struct ULONG itemData; } DRAWITEMSTRUCT32; +typedef struct +{ + DWORD cbSize; + RECT rcItem; + RECT rcButton; + DWORD stateButton; + ULONG hwndCombo; + ULONG hwndItem; + ULONG hwndList; +} COMBOBOXINFO32; + typedef struct { ULONG lParam; @@ -870,6 +881,21 @@ static size_t packed_result_32to64( UINT message, WPARAM wparam, const void *par return sizeof(*next64); } + case CB_GETCOMBOBOXINFO: + { + const COMBOBOXINFO32 *ci32 = params32; + COMBOBOXINFO *ci64 = params64; + + ci64->cbSize = sizeof(*ci32); + ci64->rcItem = ci32->rcItem; + ci64->rcButton = ci32->rcButton; + ci64->stateButton = ci32->stateButton; + ci64->hwndCombo = LongToHandle( ci32->hwndCombo ); + ci64->hwndItem = LongToHandle( ci32->hwndItem ); + ci64->hwndList = LongToHandle( ci32->hwndList ); + return sizeof(*ci64); + } + case WM_GETTEXT: case WM_ASKCBFORMATNAME: case WM_GETMINMAXINFO: @@ -3416,6 +3442,29 @@ static LRESULT message_call_32to64( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l return NtUserMessageCall( hwnd, msg, wparam, (LPARAM)&ps, result_info, type, ansi ); } + case CB_GETCOMBOBOXINFO: + { + COMBOBOXINFO32 *ci32 = (COMBOBOXINFO32 *)lparam; + COMBOBOXINFO ci; + + ci.cbSize = ci32->cbSize; + ci.rcItem = ci32->rcItem; + ci.rcButton = ci32->rcButton; + ci.stateButton = ci32->stateButton; + ci.hwndCombo = LongToHandle( ci32->hwndCombo ); + ci.hwndItem = LongToHandle( ci32->hwndItem ); + ci.hwndList = LongToHandle( ci32->hwndList ); + ret = NtUserMessageCall( hwnd, msg, wparam, (LPARAM)&ci, result_info, type, ansi ); + ci32->cbSize = ci.cbSize; + ci32->rcItem = ci.rcItem; + ci32->rcButton = ci.rcButton; + ci32->stateButton = ci.stateButton; + ci32->hwndCombo = HandleToLong( ci.hwndCombo ); + ci32->hwndItem = HandleToLong( ci.hwndItem ); + ci32->hwndList = HandleToLong( ci.hwndList ); + return ret; + } + default: return NtUserMessageCall( hwnd, msg, wparam, lparam, result_info, type, ansi ); }
1
0
0
0
Esme Povirk : comctl32/tests: Test MSAA events for tab controls.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: 676e32583248e7432599ae6aa790886c2fa6db3e URL:
https://gitlab.winehq.org/wine/wine/-/commit/676e32583248e7432599ae6aa79088…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Sat Jul 29 14:47:00 2023 -0500 comctl32/tests: Test MSAA events for tab controls. --- dlls/comctl32/tests/msg.h | 13 +++++--- dlls/comctl32/tests/tab.c | 82 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 88 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/tests/msg.h b/dlls/comctl32/tests/msg.h index f6877d6a2b1..16a8f6e92eb 100644 --- a/dlls/comctl32/tests/msg.h +++ b/dlls/comctl32/tests/msg.h @@ -61,6 +61,8 @@ struct msg_sequence struct message *sequence; }; +static HWINEVENTHOOK hwineventhook; + static void add_message(struct msg_sequence **seq, int sequence_index, const struct message *msg) { @@ -120,7 +122,7 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index, if (expected->message == actual->message) { if ((expected->flags & defwinproc) != (actual->flags & defwinproc) && - (expected->flags & optional)) + ((expected->flags & optional) || ((expected->flags & winevent_hook) && !hwineventhook))) { /* don't match messages if their defwinproc status differs */ expected++; @@ -140,7 +142,8 @@ static void dump_sequence( struct msg_sequence **seq, int sequence_index, } /* optional trailing messages */ - while (expected->message && expected->flags & optional) + while (expected->message && (expected->flags & optional || + ((expected->flags & winevent_hook) && !hwineventhook))) { trace_(file, line)( " %u: expected: msg %04x - actual: nothing\n", count, expected->message ); expected++; @@ -249,7 +252,7 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, if (expected->flags & id) { - if (expected->id != actual->id && expected->flags & optional) + if (expected->id != actual->id && ((expected->flags & optional) || ((expected->flags & winevent_hook) && !hwineventhook))) { expected++; continue; @@ -321,7 +324,7 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, expected++; actual++; } - else if (expected->flags & optional) + else if ((expected->flags & optional) || ((expected->flags & winevent_hook) && !hwineventhook)) expected++; else if (todo) { @@ -345,7 +348,7 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index, } /* skip all optional trailing messages */ - while (expected->message && ((expected->flags & optional))) + while (expected->message && ((expected->flags & optional) || ((expected->flags & winevent_hook) && !hwineventhook))) expected++; if (todo) diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index 67dea94b55c..a5c51690689 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -85,9 +85,54 @@ static HFONT hFont; static DRAWITEMSTRUCT g_drawitem; static HWND parent_wnd; static LRESULT tcn_selchanging_result; +static DWORD winevent_hook_thread_id; static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; +static void CALLBACK msg_winevent_proc(HWINEVENTHOOK hevent, + DWORD event, + HWND hwnd, + LONG object_id, + LONG child_id, + DWORD thread_id, + DWORD event_time) +{ + struct message msg = {0}; + char class_name[256]; + + ok(thread_id == winevent_hook_thread_id, "we didn't ask for events from other threads\n"); + + /* ignore window and other system events */ + if (object_id != OBJID_CLIENT) return; + + /* ignore events not from a tab control */ + if (!GetClassNameA(hwnd, class_name, ARRAY_SIZE(class_name)) || + strcmp(class_name, WC_TABCONTROLA) != 0) + return; + + msg.message = event; + msg.flags = winevent_hook|wparam|lparam; + msg.wParam = object_id; + msg.lParam = child_id; + add_message(sequences, TAB_SEQ_INDEX, &msg); +} + +static void init_winevent_hook(void) { + hwineventhook = SetWinEventHook(EVENT_MIN, EVENT_MAX, GetModuleHandleA(0), msg_winevent_proc, + 0, GetCurrentThreadId(), WINEVENT_INCONTEXT); + winevent_hook_thread_id = GetCurrentThreadId(); + if (!hwineventhook) + win_skip( "no win event hook support\n" ); +} + +static void uninit_winevent_hook(void) { + if (!hwineventhook) + return; + + UnhookWinEvent(hwineventhook); + hwineventhook = 0; +} + static const struct message empty_sequence[] = { { 0 } }; @@ -99,10 +144,28 @@ static const struct message get_row_count_seq[] = { static const struct message getset_cur_focus_seq[] = { { TCM_SETCURFOCUS, sent|lparam, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 5 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_SETCURFOCUS, sent|lparam, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_SETCURSEL, sent|lparam, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, + { TCM_SETCURFOCUS, sent|lparam, 0 }, + { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, + { 0 } +}; + +static const struct message getset_cur_focus_buttons_seq[] = { + { TCM_SETCURFOCUS, sent|lparam, 0 }, + { TCM_GETITEMCOUNT, sent|defwinproc|optional }, + { TCM_GETITEMCOUNT, sent|defwinproc|optional }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 5 }, + { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, + { TCM_SETCURFOCUS, sent|lparam, 0 }, + { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, + { TCM_SETCURSEL, sent|lparam, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, { TCM_SETCURFOCUS, sent|lparam, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { 0 } @@ -110,11 +173,14 @@ static const struct message getset_cur_focus_seq[] = { static const struct message getset_cur_sel_seq[] = { { TCM_SETCURSEL, sent|lparam, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 5 }, { TCM_GETCURSEL, sent|wparam|lparam, 0, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_SETCURSEL, sent|lparam, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { TCM_GETCURSEL, sent|wparam|lparam, 0, 0 }, { TCM_SETCURSEL, sent|lparam, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, { TCM_SETCURSEL, sent|lparam, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { 0 } @@ -166,6 +232,7 @@ static const struct message insert_focus_seq[] = { { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_INSERTITEMA, sent|wparam, 1 }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, { WM_NOTIFYFORMAT, sent|defwinproc|optional }, { WM_QUERYUISTATE, sent|defwinproc|optional }, { WM_PARENTNOTIFY, sent|defwinproc|optional }, @@ -175,11 +242,14 @@ static const struct message insert_focus_seq[] = { { WM_NOTIFYFORMAT, sent|defwinproc|optional }, { WM_QUERYUISTATE, sent|defwinproc|optional, }, { WM_PARENTNOTIFY, sent|defwinproc|optional }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_SETCURFOCUS, sent|wparam|lparam, -1, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_INSERTITEMA, sent|wparam, 3 }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CLIENT, 3 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { 0 } }; @@ -188,11 +258,14 @@ static const struct message delete_focus_seq[] = { { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_DELETEITEM, sent|wparam|lparam, 1, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, OBJID_CLIENT, 2 }, { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_SETCURFOCUS, sent|wparam|lparam, -1, 0 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { TCM_DELETEITEM, sent|wparam|lparam, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, { TCM_GETITEMCOUNT, sent|wparam|lparam, 0, 0 }, { TCM_GETCURFOCUS, sent|wparam|lparam, 0, 0 }, { 0 } @@ -347,7 +420,8 @@ static LRESULT WINAPI tab_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, message != WM_NCHITTEST && message != WM_GETTEXT && message != WM_GETICON && - message != WM_DEVICECHANGE) + message != WM_DEVICECHANGE && + message != WM_GETOBJECT) { msg.message = message; msg.flags = sent|wparam|lparam; @@ -667,7 +741,7 @@ static void test_curfocus(void) todo_wine ok(ret == nTabs - 1, "Unexpected focus index %d.\n", ret); - ok_sequence(sequences, TAB_SEQ_INDEX, getset_cur_focus_seq, "TCS_BUTTONS: set focused tab sequence", FALSE); + ok_sequence(sequences, TAB_SEQ_INDEX, getset_cur_focus_buttons_seq, "TCS_BUTTONS: set focused tab sequence", FALSE); ok_sequence(sequences, PARENT_SEQ_INDEX, setfocus_parent_seq, "TCS_BUTTONS: set focused tab parent sequence", TRUE); DestroyWindow(hTab); @@ -1501,6 +1575,8 @@ START_TEST(tab) init_msg_sequences(sequences, NUM_MSG_SEQUENCES); + init_winevent_hook(); + parent_wnd = createParentWindow(); ok(parent_wnd != NULL, "Failed to create parent window!\n"); @@ -1523,5 +1599,7 @@ START_TEST(tab) test_TCN_SELCHANGING(); test_TCM_GETROWCOUNT(); + uninit_winevent_hook(); + DestroyWindow(parent_wnd); }
1
0
0
0
Esme Povirk : comctl32: Add support for MSAA events on tab controls.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: 35930f2d87cfc881c41aad5192032b248f9c1f96 URL:
https://gitlab.winehq.org/wine/wine/-/commit/35930f2d87cfc881c41aad5192032b…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Sat Jul 29 15:13:52 2023 -0500 comctl32: Add support for MSAA events on tab controls. --- dlls/comctl32/tab.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 8943d9dce7c..13abbd8078d 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -271,6 +271,7 @@ static inline LRESULT TAB_SetCurSel (TAB_INFO *infoPtr, INT iItem) TAB_EnsureSelectionVisible(infoPtr); TAB_InvalidateTabArea(infoPtr); + NotifyWinEvent(EVENT_OBJECT_SELECTION, infoPtr->hwnd, OBJID_CLIENT, infoPtr->iSelected + 1); } return prevItem; @@ -286,6 +287,8 @@ static LRESULT TAB_SetCurFocus (TAB_INFO *infoPtr, INT iItem) infoPtr->iSelected = -1; TAB_SendSimpleNotify(infoPtr, TCN_SELCHANGE); TAB_InvalidateTabArea(infoPtr); + if (!(infoPtr->dwStyle & TCS_BUTTONS)) + NotifyWinEvent(EVENT_OBJECT_SELECTION, infoPtr->hwnd, OBJID_CLIENT, 0); } } else if (iItem < infoPtr->uNumItem) { @@ -306,6 +309,7 @@ static LRESULT TAB_SetCurFocus (TAB_INFO *infoPtr, INT iItem) InvalidateRect(infoPtr->hwnd, &r, FALSE); TAB_SendSimpleNotify(infoPtr, TCN_FOCUSCHANGE); + NotifyWinEvent(EVENT_OBJECT_FOCUS, infoPtr->hwnd, OBJID_CLIENT, iItem + 1); } } else { INT oldFocus = infoPtr->uFocus; @@ -320,6 +324,7 @@ static LRESULT TAB_SetCurFocus (TAB_INFO *infoPtr, INT iItem) infoPtr->iSelected = iItem; TAB_EnsureSelectionVisible(infoPtr); TAB_InvalidateTabArea(infoPtr); + NotifyWinEvent(EVENT_OBJECT_SELECTION, infoPtr->hwnd, OBJID_CLIENT, iItem + 1); } } } @@ -2635,6 +2640,9 @@ TAB_InsertItemT (TAB_INFO *infoPtr, INT iItem, const TCITEMW *pti, BOOL bUnicode else InvalidateRect(infoPtr->hwnd, NULL, TRUE); + /* The last item is always the "new" MSAA object. */ + NotifyWinEvent(EVENT_OBJECT_CREATE, infoPtr->hwnd, OBJID_CLIENT, infoPtr->uNumItem); + TRACE("[%p]: added item %d %s\n", infoPtr->hwnd, iItem, debugstr_w(item->pszText)); @@ -2861,6 +2869,9 @@ static LRESULT TAB_DeleteItem (TAB_INFO *infoPtr, INT iItem) /* reposition and repaint tabs */ TAB_SetItemBounds(infoPtr); + /* The last item is always the destroyed MSAA object */ + NotifyWinEvent(EVENT_OBJECT_DESTROY, infoPtr->hwnd, OBJID_CLIENT, infoPtr->uNumItem + 1); + return TRUE; }
1
0
0
0
Mohamad Al-Jaf : msvcp140_codecvt_ids: Add DLL.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: 7ac4bbb2de9ad3137fb746b44074377297bc07ba URL:
https://gitlab.winehq.org/wine/wine/-/commit/7ac4bbb2de9ad3137fb746b4407437…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Thu Jul 27 19:23:30 2023 -0400 msvcp140_codecvt_ids: Add DLL. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55344
--- configure | 2 ++ configure.ac | 1 + dlls/msvcp140_codecvt_ids/Makefile.in | 4 +++ dlls/msvcp140_codecvt_ids/main.c | 32 ++++++++++++++++++++++ .../msvcp140_codecvt_ids/msvcp140_codecvt_ids.spec | 4 +++ 5 files changed, 43 insertions(+) diff --git a/configure b/configure index 9c15f952298..df70e31a897 100755 --- a/configure +++ b/configure @@ -1270,6 +1270,7 @@ enable_msvcp140 enable_msvcp140_1 enable_msvcp140_2 enable_msvcp140_atomic_wait +enable_msvcp140_codecvt_ids enable_msvcp60 enable_msvcp70 enable_msvcp71 @@ -21575,6 +21576,7 @@ wine_fn_config_makefile dlls/msvcp140_1/tests enable_tests wine_fn_config_makefile dlls/msvcp140_2 enable_msvcp140_2 wine_fn_config_makefile dlls/msvcp140_atomic_wait enable_msvcp140_atomic_wait wine_fn_config_makefile dlls/msvcp140_atomic_wait/tests enable_tests +wine_fn_config_makefile dlls/msvcp140_codecvt_ids enable_msvcp140_codecvt_ids wine_fn_config_makefile dlls/msvcp60 enable_msvcp60 wine_fn_config_makefile dlls/msvcp60/tests enable_tests wine_fn_config_makefile dlls/msvcp70 enable_msvcp70 diff --git a/configure.ac b/configure.ac index dab2bb07302..cf26113ca06 100644 --- a/configure.ac +++ b/configure.ac @@ -2837,6 +2837,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp140_1/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp140_2) WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait) WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait/tests) +WINE_CONFIG_MAKEFILE(dlls/msvcp140_codecvt_ids) WINE_CONFIG_MAKEFILE(dlls/msvcp60) WINE_CONFIG_MAKEFILE(dlls/msvcp60/tests) WINE_CONFIG_MAKEFILE(dlls/msvcp70) diff --git a/dlls/msvcp140_codecvt_ids/Makefile.in b/dlls/msvcp140_codecvt_ids/Makefile.in new file mode 100644 index 00000000000..14e820b01fe --- /dev/null +++ b/dlls/msvcp140_codecvt_ids/Makefile.in @@ -0,0 +1,4 @@ +MODULE = msvcp140_codecvt_ids.dll + +C_SRCS = \ + main.c diff --git a/dlls/msvcp140_codecvt_ids/main.c b/dlls/msvcp140_codecvt_ids/main.c new file mode 100644 index 00000000000..d71263a3e5d --- /dev/null +++ b/dlls/msvcp140_codecvt_ids/main.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2023 Mohamad Al-Jaf + * + * 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 + */ + +#include <stdarg.h> + +typedef struct { + size_t id; +} locale_id; + +/* ?id@?$codecvt@_SDU_Mbstatet@@@std@@2V0locale@2@A */ +locale_id codecvt_char16_id = {0}; +/* ?id@?$codecvt@_S_QU_Mbstatet@@@std@@2V0locale@2@A */ +locale_id codecvt_char16_char8_id = {0}; +/* ?id@?$codecvt@_UDU_Mbstatet@@@std@@2V0locale@2@A */ +locale_id codecvt_char32_id = {0}; +/* ?id@?$codecvt@_U_QU_Mbstatet@@@std@@2V0locale@2@A */ +locale_id codecvt_char32_char8_id = {0}; diff --git a/dlls/msvcp140_codecvt_ids/msvcp140_codecvt_ids.spec b/dlls/msvcp140_codecvt_ids/msvcp140_codecvt_ids.spec new file mode 100644 index 00000000000..4fd4b65e32a --- /dev/null +++ b/dlls/msvcp140_codecvt_ids/msvcp140_codecvt_ids.spec @@ -0,0 +1,4 @@ +@ extern ?id@?$codecvt@_SDU_Mbstatet@@@std@@2V0locale@2@A codecvt_char16_id +@ extern ?id@?$codecvt@_S_QU_Mbstatet@@@std@@2V0locale@2@A codecvt_char16_char8_id +@ extern ?id@?$codecvt@_UDU_Mbstatet@@@std@@2V0locale@2@A codecvt_char32_id +@ extern ?id@?$codecvt@_U_QU_Mbstatet@@@std@@2V0locale@2@A codecvt_char32_char8_id
1
0
0
0
David Kahurani : gdiplus: Use get_log_fontW in GdipGetLogFontW.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: 08d9f9b60b4787fd020c867c323d2c401b6e8e23 URL:
https://gitlab.winehq.org/wine/wine/-/commit/08d9f9b60b4787fd020c867c323d2c…
Author: David Kahurani <k.kahurani(a)gmail.com> Date: Tue Aug 1 12:23:26 2023 +0300 gdiplus: Use get_log_fontW in GdipGetLogFontW. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> --- dlls/gdiplus/font.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 316f65d84cf..7bd60750e6d 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -480,24 +480,15 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW GdipMultiplyMatrix(&matrix, &graphics->gdi_transform, MatrixOrderAppend); transform_properties(graphics, &matrix, FALSE, NULL, &rel_height, &angle); + get_log_fontW(font, graphics, lf); + lf->lfHeight = -gdip_round(height * rel_height); - lf->lfWidth = 0; lf->lfEscapement = lf->lfOrientation = gdip_round((angle / M_PI) * 1800.0); if (lf->lfEscapement < 0) { lf->lfEscapement += 3600; lf->lfOrientation += 3600; } - lf->lfWeight = font->otm.otmTextMetrics.tmWeight; - lf->lfItalic = font->otm.otmTextMetrics.tmItalic ? 1 : 0; - lf->lfUnderline = font->otm.otmTextMetrics.tmUnderlined ? 1 : 0; - lf->lfStrikeOut = font->otm.otmTextMetrics.tmStruckOut ? 1 : 0; - lf->lfCharSet = font->otm.otmTextMetrics.tmCharSet; - lf->lfOutPrecision = OUT_DEFAULT_PRECIS; - lf->lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf->lfQuality = DEFAULT_QUALITY; - lf->lfPitchAndFamily = 0; - lstrcpyW(lf->lfFaceName, font->family->FamilyName); TRACE("=> %s,%ld\n", debugstr_w(lf->lfFaceName), lf->lfHeight);
1
0
0
0
David Kahurani : gdiplus: Use helper to calculate transform properties.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: 326a9e18bbd93ad3fd9dc70de94faffcbef5fa23 URL:
https://gitlab.winehq.org/wine/wine/-/commit/326a9e18bbd93ad3fd9dc70de94faf…
Author: David Kahurani <k.kahurani(a)gmail.com> Date: Tue Aug 1 11:45:09 2023 +0300 gdiplus: Use helper to calculate transform properties. Signed-off-by: David Kahurani <k.kahurani(a)gmail.com> --- dlls/gdiplus/font.c | 14 +------ dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/graphics.c | 88 ++++++++++++++---------------------------- 3 files changed, 32 insertions(+), 71 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 024d27c1ce7..316f65d84cf 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -456,7 +456,6 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW { REAL angle, rel_height, height; GpMatrix matrix; - GpPointF pt[3]; TRACE("(%p, %p, %p)\n", font, graphics, lf); @@ -479,19 +478,8 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW height = units_to_pixels(font->emSize, font->unit, graphics->yres, graphics->printer_display); } - pt[0].X = 0.0; - pt[0].Y = 0.0; - pt[1].X = 1.0; - pt[1].Y = 0.0; - pt[2].X = 0.0; - pt[2].Y = 1.0; - GdipMultiplyMatrix(&matrix, &graphics->gdi_transform, MatrixOrderAppend); - GdipTransformMatrixPoints(&matrix, pt, 3); - angle = -gdiplus_atan2((pt[1].Y - pt[0].Y), (pt[1].X - pt[0].X)); - rel_height = sqrt((pt[2].Y - pt[0].Y) * (pt[2].Y - pt[0].Y)+ - (pt[2].X - pt[0].X) * (pt[2].X - pt[0].X)); - + transform_properties(graphics, &matrix, FALSE, NULL, &rel_height, &angle); lf->lfHeight = -gdip_round(height * rel_height); lf->lfWidth = 0; lf->lfEscapement = lf->lfOrientation = gdip_round((angle / M_PI) * 1800.0); diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index c292318b06e..1bc058b3413 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -69,6 +69,7 @@ extern GpStatus get_graphics_transform(GpGraphics *graphics, GpCoordinateSpace d GpCoordinateSpace src_space, GpMatrix *matrix); extern GpStatus gdip_transform_points(GpGraphics *graphics, GpCoordinateSpace dst_space, GpCoordinateSpace src_space, GpPointF *points, INT count); +void transform_properties(GpGraphics *, GDIPCONST GpMatrix *, BOOL, REAL *, REAL *, REAL *); extern GpStatus graphics_from_image(GpImage *image, GpGraphics **graphics); extern GpStatus encode_image_png(GpImage *image, IStream* stream, GDIPCONST EncoderParameters* params); diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 6dc34707bbf..758889eca06 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2303,7 +2303,6 @@ static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, LOGFONTW *lfw_return, GDIPCONST GpMatrix *matrix) { HDC hdc = CreateCompatibleDC(0); - GpPointF pt[3]; REAL angle, rel_width, rel_height, font_height; LOGFONTW lfw; HFONT unscaled_font; @@ -2321,24 +2320,7 @@ static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font, font_height = font->emSize * unit_scale; } - pt[0].X = 0.0; - pt[0].Y = 0.0; - pt[1].X = 1.0; - pt[1].Y = 0.0; - pt[2].X = 0.0; - pt[2].Y = 1.0; - if (matrix) - { - GpMatrix xform = *matrix; - GdipTransformMatrixPoints(&xform, pt, 3); - } - - gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, pt, 3); - angle = -gdiplus_atan2((pt[1].Y - pt[0].Y), (pt[1].X - pt[0].X)); - rel_width = sqrt((pt[1].Y-pt[0].Y)*(pt[1].Y-pt[0].Y)+ - (pt[1].X-pt[0].X)*(pt[1].X-pt[0].X)); - rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+ - (pt[2].X-pt[0].X)*(pt[2].X-pt[0].X)); + transform_properties(graphics, matrix, TRUE, &rel_width, &rel_height, &angle); /* If the font unit is not pixels scaling should not be applied */ if (font->unit != UnitPixel && font->unit != UnitWorld) { @@ -5373,6 +5355,31 @@ GpStatus gdip_format_string(HDC hdc, return stat; } +void transform_properties(GpGraphics *graphics, GDIPCONST GpMatrix *matrix, BOOL graphics_transform, + REAL *rel_width, REAL *rel_height, REAL *angle) +{ + GpPointF pt[3] = {{0.0f, 0.0f}, {1.0f, 0.0f}, {0.0f, 1.0f}}; + GpMatrix xform; + + if (matrix) + { + xform = *matrix; + GdipTransformMatrixPoints(&xform, pt, 3); + } + + if (graphics_transform) + gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, pt, 3); + + if (rel_width) + *rel_width = sqrt((pt[1].Y-pt[0].Y)*(pt[1].Y-pt[0].Y)+ + (pt[1].X-pt[0].X)*(pt[1].X-pt[0].X)); + if (rel_height) + *rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+ + (pt[2].X-pt[0].X)*(pt[2].X-pt[0].X)); + if (angle) + *angle = -gdiplus_atan2((pt[1].Y - pt[0].Y), (pt[1].X - pt[0].X)); +} + struct measure_ranges_args { GpRegion **regions; REAL rel_width, rel_height; @@ -5427,7 +5434,6 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, HFONT gdifont, oldfont; struct measure_ranges_args args; HDC hdc, temp_hdc=NULL; - GpPointF pt[3]; RectF scaled_rect; REAL margin_x; @@ -5451,21 +5457,10 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, if (stringFormat->attr) TRACE("may be ignoring some format flags: attr %x\n", stringFormat->attr); - pt[0].X = 0.0; - pt[0].Y = 0.0; - pt[1].X = 1.0; - pt[1].Y = 0.0; - pt[2].X = 0.0; - pt[2].Y = 1.0; - gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, pt, 3); - args.rel_width = sqrt((pt[1].Y-pt[0].Y)*(pt[1].Y-pt[0].Y)+ - (pt[1].X-pt[0].X)*(pt[1].X-pt[0].X)); - args.rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+ - (pt[2].X-pt[0].X)*(pt[2].X-pt[0].X)); margin_x = stringFormat->generic_typographic ? 0.0 : font->emSize / 6.0; margin_x *= units_scale(font->unit, graphics->unit, graphics->xres, graphics->printer_display); - + transform_properties(graphics, NULL, TRUE, &args.rel_width, &args.rel_height, NULL); scaled_rect.X = (layoutRect->X + margin_x) * args.rel_width; scaled_rect.Y = layoutRect->Y * args.rel_height; scaled_rect.Width = layoutRect->Width * args.rel_width; @@ -5554,7 +5549,6 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, HFONT oldfont, gdifont; struct measure_string_args args; HDC temp_hdc=NULL, hdc; - GpPointF pt[3]; RectF scaled_rect; REAL margin_x; INT lines, glyphs; @@ -5580,18 +5574,7 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, if(format) TRACE("may be ignoring some format flags: attr %x\n", format->attr); - pt[0].X = 0.0; - pt[0].Y = 0.0; - pt[1].X = 1.0; - pt[1].Y = 0.0; - pt[2].X = 0.0; - pt[2].Y = 1.0; - gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, pt, 3); - args.rel_width = sqrt((pt[1].Y-pt[0].Y)*(pt[1].Y-pt[0].Y)+ - (pt[1].X-pt[0].X)*(pt[1].X-pt[0].X)); - args.rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+ - (pt[2].X-pt[0].X)*(pt[2].X-pt[0].X)); - + transform_properties(graphics, NULL, TRUE, &args.rel_width, &args.rel_height, NULL); margin_x = (format && format->generic_typographic) ? 0.0 : font->emSize / 6.0; margin_x *= units_scale(font->unit, graphics->unit, graphics->xres, graphics->printer_display); @@ -5699,7 +5682,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string { HRGN rgn = NULL; HFONT gdifont; - GpPointF pt[3], rectcpy[4]; + GpPointF rectcpy[4]; POINT corners[4]; REAL rel_width, rel_height, margin_x; INT save_state, format_flags = 0; @@ -5748,18 +5731,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string save_state = SaveDC(hdc); - pt[0].X = 0.0; - pt[0].Y = 0.0; - pt[1].X = 1.0; - pt[1].Y = 0.0; - pt[2].X = 0.0; - pt[2].Y = 1.0; - gdip_transform_points(graphics, WineCoordinateSpaceGdiDevice, CoordinateSpaceWorld, pt, 3); - rel_width = sqrt((pt[1].Y-pt[0].Y)*(pt[1].Y-pt[0].Y)+ - (pt[1].X-pt[0].X)*(pt[1].X-pt[0].X)); - rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+ - (pt[2].X-pt[0].X)*(pt[2].X-pt[0].X)); - + transform_properties(graphics, NULL, TRUE, &rel_width, &rel_height, NULL); rectcpy[3].X = rectcpy[0].X = rect->X; rectcpy[1].Y = rectcpy[0].Y = rect->Y; rectcpy[2].X = rectcpy[1].X = rect->X + rect->Width;
1
0
0
0
Gabriel Ivăncescu : mshtml: Use unlink and destructor in the vtbl for the MutationObserver constructor.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: f937b89cd7b8ebd5e685fa5ea92c3dab66d2b07b URL:
https://gitlab.winehq.org/wine/wine/-/commit/f937b89cd7b8ebd5e685fa5ea92c3d…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 1 19:45:25 2023 +0300 mshtml: Use unlink and destructor in the vtbl for the MutationObserver constructor. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/mutation.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index e6d080cff16..3f544e0a90f 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -1303,10 +1303,8 @@ static ULONG WINAPI mutation_observer_ctor_Release(IUnknown *iface) TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) { + if(!ref) release_dispex(&This->dispex); - free(This); - } return ref; } @@ -1317,6 +1315,12 @@ static const IUnknownVtbl mutation_observer_ctor_vtbl = { mutation_observer_ctor_Release, }; +static void mutation_observer_ctor_destructor(DispatchEx *dispex) +{ + struct mutation_observer_ctor *This = mutation_observer_ctor_from_DispatchEx(dispex); + free(This); +} + static HRESULT mutation_observer_ctor_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) @@ -1365,7 +1369,9 @@ static HRESULT mutation_observer_ctor_value(DispatchEx *dispex, LCID lcid, } static dispex_static_data_vtbl_t mutation_observer_ctor_dispex_vtbl = { - .value = mutation_observer_ctor_value + mutation_observer_ctor_destructor, + NULL, + mutation_observer_ctor_value }; static const tid_t mutation_observer_ctor_iface_tids[] = {
1
0
0
0
Gabriel Ivăncescu : mshtml: Use unlink and destructor in the vtbl for HTMLXMLHttpRequestFactory.
by Alexandre Julliard
02 Aug '23
02 Aug '23
Module: wine Branch: master Commit: 2e5ac78a7c0ca6a65d1ec97184c4053186fa1005 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2e5ac78a7c0ca6a65d1ec97184c405…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Aug 1 19:45:25 2023 +0300 mshtml: Use unlink and destructor in the vtbl for HTMLXMLHttpRequestFactory. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/xmlhttprequest.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c index 4803b5c55a1..73eea9d7f6d 100644 --- a/dlls/mshtml/xmlhttprequest.c +++ b/dlls/mshtml/xmlhttprequest.c @@ -1640,10 +1640,8 @@ static ULONG WINAPI HTMLXMLHttpRequestFactory_Release(IHTMLXMLHttpRequestFactory TRACE("(%p) ref=%ld\n", This, ref); - if(!ref) { + if(!ref) release_dispex(&This->dispex); - free(This); - } return ref; } @@ -1766,6 +1764,12 @@ static inline HTMLXMLHttpRequestFactory *factory_from_DispatchEx(DispatchEx *ifa return CONTAINING_RECORD(iface, HTMLXMLHttpRequestFactory, dispex); } +static void HTMLXMLHttpRequestFactory_destructor(DispatchEx *dispex) +{ + HTMLXMLHttpRequestFactory *This = factory_from_DispatchEx(dispex); + free(This); +} + static HRESULT HTMLXMLHttpRequestFactory_value(DispatchEx *iface, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller) { @@ -1790,7 +1794,7 @@ static HRESULT HTMLXMLHttpRequestFactory_value(DispatchEx *iface, LCID lcid, WOR } static const dispex_static_data_vtbl_t HTMLXMLHttpRequestFactory_dispex_vtbl = { - NULL, + HTMLXMLHttpRequestFactory_destructor, NULL, HTMLXMLHttpRequestFactory_value };
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
...
67
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Results per page:
10
25
50
100
200