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 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
1 participants
596 discussions
Start a n
N
ew thread
Nikolay Sivov : d2d1/commandlist: Implement FillOpacityMask() command.
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: 7cfe6d8f29ce5b69ae974e2eb53608fcd59df965 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7cfe6d8f29ce5b69ae974e2eb53608…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Aug 5 13:07:55 2022 +0300 d2d1/commandlist: Implement FillOpacityMask() command. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/command_list.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/d2d1/d2d1_private.h | 2 ++ dlls/d2d1/device.c | 6 ++++++ 3 files changed, 55 insertions(+) diff --git a/dlls/d2d1/command_list.c b/dlls/d2d1/command_list.c index 664b2f1a412..8e5654adac8 100644 --- a/dlls/d2d1/command_list.c +++ b/dlls/d2d1/command_list.c @@ -41,6 +41,7 @@ enum d2d_command_type D2D_COMMAND_DRAW_RECTANGLE, D2D_COMMAND_DRAW_BITMAP, D2D_COMMAND_FILL_MESH, + D2D_COMMAND_FILL_OPACITY_MASK, D2D_COMMAND_FILL_GEOMETRY, D2D_COMMAND_FILL_RECTANGLE, D2D_COMMAND_PUSH_CLIP, @@ -142,6 +143,15 @@ struct d2d_command_fill_mesh ID2D1Brush *brush; }; +struct d2d_command_fill_opacity_mask +{ + struct d2d_command c; + ID2D1Bitmap *bitmap; + ID2D1Brush *brush; + D2D1_RECT_F *dst_rect; + D2D1_RECT_F *src_rect; +}; + struct d2d_command_fill_geometry { struct d2d_command c; @@ -383,6 +393,12 @@ static HRESULT STDMETHODCALLTYPE d2d_command_list_Stream(ID2D1CommandList *iface hr = ID2D1CommandSink_FillMesh(sink, c->mesh, c->brush); break; } + case D2D_COMMAND_FILL_OPACITY_MASK: + { + const struct d2d_command_fill_opacity_mask *c = data; + hr = ID2D1CommandSink_FillOpacityMask(sink, c->bitmap, c->brush, c->dst_rect, c->src_rect); + break; + } case D2D_COMMAND_FILL_GEOMETRY: { const struct d2d_command_fill_geometry *c = data; @@ -960,3 +976,34 @@ void d2d_command_list_fill_mesh(struct d2d_command_list *command_list, const str command->mesh = mesh; command->brush = brush; } + +void d2d_command_list_fill_opacity_mask(struct d2d_command_list *command_list, const struct d2d_device_context *context, + ID2D1Bitmap *bitmap, ID2D1Brush *orig_brush, const D2D1_RECT_F *dst_rect, const D2D1_RECT_F *src_rect) +{ + struct d2d_command_fill_opacity_mask *command; + ID2D1Brush *brush; + size_t size; + BYTE *data; + + if (FAILED(d2d_command_list_create_brush(command_list, context, orig_brush, &brush))) + { + command_list->state = D2D_COMMAND_LIST_STATE_ERROR; + return; + } + + size = sizeof(*command); + if (dst_rect) size += sizeof(*dst_rect); + if (src_rect) size += sizeof(*src_rect); + + d2d_command_list_reference_object(command_list, bitmap); + + command = d2d_command_list_require_space(command_list, size); + command->c.op = D2D_COMMAND_FILL_OPACITY_MASK; + command->bitmap = bitmap; + command->brush = brush; + + data = (BYTE *)(command + 1); + + d2d_command_list_write_field(&data, &command->dst_rect, dst_rect, sizeof(*dst_rect)); + d2d_command_list_write_field(&data, &command->src_rect, src_rect, sizeof(*src_rect)); +} diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index eae8801fe4b..4cc77079e0f 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -771,6 +771,8 @@ void d2d_command_list_draw_bitmap(struct d2d_command_list *command_list, ID2D1Bi const D2D1_RECT_F *src_rect, const D2D1_MATRIX_4X4_F *perspective_transform) DECLSPEC_HIDDEN; void d2d_command_list_fill_mesh(struct d2d_command_list *command_list, const struct d2d_device_context *context, ID2D1Mesh *mesh, ID2D1Brush *orig_brush) DECLSPEC_HIDDEN; +void d2d_command_list_fill_opacity_mask(struct d2d_command_list *command_list, const struct d2d_device_context *context, + ID2D1Bitmap *bitmap, ID2D1Brush *orig_brush, const D2D1_RECT_F *dst_rect, const D2D1_RECT_F *src_rect) DECLSPEC_HIDDEN; static inline BOOL d2d_array_reserve(void **elements, size_t *capacity, size_t count, size_t size) { diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index 7bed9245d75..796d837c3d9 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -1115,6 +1115,9 @@ static void STDMETHODCALLTYPE d2d_device_context_FillOpacityMask(ID2D1DeviceCont d2d_device_context_set_error(context, E_INVALIDARG); return; } + + if (context->target.type == D2D_TARGET_COMMAND_LIST) + d2d_command_list_fill_opacity_mask(context->target.command_list, context, mask, brush, dst_rect, src_rect); } static void d2d_device_context_draw_bitmap(struct d2d_device_context *context, ID2D1Bitmap *bitmap, @@ -2614,6 +2617,9 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_FillOpacityM d2d_device_context_set_error(context, D2DERR_WRONG_STATE); return; } + + if (context->target.type == D2D_TARGET_COMMAND_LIST) + d2d_command_list_fill_opacity_mask(context->target.command_list, context, mask, brush, dst_rect, src_rect); } static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateFilledGeometryRealization(ID2D1DeviceContext1 *iface,
1
0
0
0
Nikolay Sivov : d2d1: Add parameter validation to FillOpacityMask().
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: 4f1dfdad1d529e004043f16c1fff1dc8e9895094 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4f1dfdad1d529e004043f16c1fff1d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Aug 5 00:54:07 2022 +0300 d2d1: Add parameter validation to FillOpacityMask(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d2d1/device.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index c502c5dc4e4..7bed9245d75 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -1096,8 +1096,25 @@ static void STDMETHODCALLTYPE d2d_device_context_FillOpacityMask(ID2D1DeviceCont ID2D1Bitmap *mask, ID2D1Brush *brush, D2D1_OPACITY_MASK_CONTENT content, const D2D1_RECT_F *dst_rect, const D2D1_RECT_F *src_rect) { + struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); + FIXME("iface %p, mask %p, brush %p, content %#x, dst_rect %s, src_rect %s stub!\n", iface, mask, brush, content, debug_d2d_rect_f(dst_rect), debug_d2d_rect_f(src_rect)); + + if (FAILED(context->error.code)) + return; + + if (context->drawing_state.antialiasMode != D2D1_ANTIALIAS_MODE_ALIASED) + { + d2d_device_context_set_error(context, D2DERR_WRONG_STATE); + return; + } + + if ((unsigned int)content > D2D1_OPACITY_MASK_CONTENT_TEXT_GDI_COMPATIBLE) + { + d2d_device_context_set_error(context, E_INVALIDARG); + return; + } } static void d2d_device_context_draw_bitmap(struct d2d_device_context *context, ID2D1Bitmap *bitmap, @@ -2584,8 +2601,19 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectRequiredInputRectan static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_FillOpacityMask(ID2D1DeviceContext1 *iface, ID2D1Bitmap *mask, ID2D1Brush *brush, const D2D1_RECT_F *dst_rect, const D2D1_RECT_F *src_rect) { + struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); + FIXME("iface %p, mask %p, brush %p, dst_rect %s, src_rect %s stub!\n", iface, mask, brush, debug_d2d_rect_f(dst_rect), debug_d2d_rect_f(src_rect)); + + if (FAILED(context->error.code)) + return; + + if (context->drawing_state.antialiasMode != D2D1_ANTIALIAS_MODE_ALIASED) + { + d2d_device_context_set_error(context, D2DERR_WRONG_STATE); + return; + } } static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateFilledGeometryRealization(ID2D1DeviceContext1 *iface,
1
0
0
0
Jacek Caban : user32: Remove USER_CheckNotLock.
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: 929694c66d216484ba54b1c2c270d63b41d93ea9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/929694c66d216484ba54b1c2c270d6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 29 19:55:35 2022 +0200 user32: Remove USER_CheckNotLock. It's no longer interesting. Its remaining callers are not used by locked code, which is restricted to win32u. --- dlls/user32/user_main.c | 10 ---------- dlls/user32/user_private.h | 1 - dlls/user32/win.c | 8 -------- dlls/user32/winproc.c | 2 -- dlls/win32u/sysparams.c | 8 -------- include/ntuser.h | 1 - 6 files changed, 30 deletions(-) diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 91f2891f198..acbd93cccdd 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -41,16 +41,6 @@ HMODULE user32_module = 0; extern void WDML_NotifyThreadDetach(void); -/*********************************************************************** - * USER_CheckNotLock - * - * Make sure that we don't hold the user lock. - */ -void USER_CheckNotLock(void) -{ - NtUserCallOneParam( 2, NtUserLock ); -} - /*********************************************************************** * UserRealizePalette (USER32.@) diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 8e3388c6fd5..4abb0080a0f 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -73,7 +73,6 @@ extern BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping extern HPEN SYSCOLOR_GetPen( INT index ) DECLSPEC_HIDDEN; extern HBRUSH SYSCOLOR_Get55AABrush(void) DECLSPEC_HIDDEN; extern void SYSPARAMS_Init(void) DECLSPEC_HIDDEN; -extern void USER_CheckNotLock(void) DECLSPEC_HIDDEN; typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result, void *arg ); diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 93ac7f7b7c5..8ba4b6ea69e 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1034,8 +1034,6 @@ BOOL WINAPI EnumWindows( WNDENUMPROC lpEnumFunc, LPARAM lParam ) BOOL ret = TRUE; int i; - USER_CheckNotLock(); - /* We have to build a list of all windows first, to avoid */ /* unpleasant side-effects, for instance if the callback */ /* function changes the Z-order of the windows. */ @@ -1064,8 +1062,6 @@ BOOL WINAPI EnumThreadWindows( DWORD id, WNDENUMPROC func, LPARAM lParam ) int i; BOOL ret = TRUE; - USER_CheckNotLock(); - if (!(list = list_window_children( 0, GetDesktopWindow(), NULL, id ))) return TRUE; /* Now call the callback function for every window */ @@ -1085,8 +1081,6 @@ BOOL WINAPI EnumDesktopWindows( HDESK desktop, WNDENUMPROC func, LPARAM lparam ) HWND *list; int i; - USER_CheckNotLock(); - if (!(list = list_window_children( desktop, 0, NULL, 0 ))) return TRUE; for (i = 0; list[i]; i++) @@ -1159,8 +1153,6 @@ BOOL WINAPI EnumChildWindows( HWND parent, WNDENUMPROC func, LPARAM lParam ) HWND *list; BOOL ret; - USER_CheckNotLock(); - if (!(list = WIN_ListChildren( parent ))) return FALSE; ret = WIN_EnumChildWindows( list, func, lParam ); HeapFree( GetProcessHeap(), 0, list ); diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 3b7927891b5..cc59a290ca5 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -147,8 +147,6 @@ static LRESULT call_dialog_proc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRES WNDPROC proc = arg; LRESULT ret; - USER_CheckNotLock(); - hwnd = WIN_GetFullHandle( hwnd ); TRACE_(relay)( "\1Call dialog proc %p (hwnd=%p,msg=%s,wp=%08Ix,lp=%08Ix)\n", proc, hwnd, SPY_GetMsgName(msg, hwnd), wp, lp ); diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 8bcf3e57624..3a77ec47769 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -5031,14 +5031,6 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) case NtUserGetDeskPattern: return get_entry( &entry_DESKPATTERN, 256, (WCHAR *)arg ); - case NtUserLock: - switch( arg ) - { - case 0: user_lock(); return 0; - case 1: user_unlock(); return 0; - default: user_check_not_lock(); return 0; - } - default: FIXME( "invalid code %u\n", code ); return 0; diff --git a/include/ntuser.h b/include/ntuser.h index 8811a9e7993..eb1b860b5c4 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -922,7 +922,6 @@ enum NtUserCallOneParam_SetProcessDefaultLayout, /* temporary exports */ NtUserGetDeskPattern, - NtUserLock, }; static inline HDWP NtUserBeginDeferWindowPos( INT count )
1
0
0
0
Jacek Caban : win32u: Introduce NtUserGetChildRect.
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: 421fb1c80493df8e9ce0b8e5dabe6e78bf624a52 URL:
https://gitlab.winehq.org/wine/wine/-/commit/421fb1c80493df8e9ce0b8e5dabe6e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 29 19:44:39 2022 +0200 win32u: Introduce NtUserGetChildRect. And use it in CalcChildScroll. --- dlls/user32/class.c | 38 ----------- dlls/user32/controls.h | 2 - dlls/user32/mdi.c | 2 +- dlls/user32/user_private.h | 3 - dlls/user32/win.c | 160 --------------------------------------------- dlls/user32/win.h | 4 -- dlls/win32u/sysparams.c | 3 - dlls/win32u/window.c | 3 + include/ntuser.h | 7 +- 9 files changed, 10 insertions(+), 212 deletions(-)
1
0
0
0
Jacek Caban : user32: Use GetClientRect in EDIT_WM_ContextMenu.
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: 98128a65e7e10d705d90ad05e2b5ff3ca517b6cb URL:
https://gitlab.winehq.org/wine/wine/-/commit/98128a65e7e10d705d90ad05e2b5ff…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 29 19:36:20 2022 +0200 user32: Use GetClientRect in EDIT_WM_ContextMenu. --- dlls/user32/edit.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 80758dd60ef..81296f7deeb 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -3328,11 +3328,16 @@ static void EDIT_WM_ContextMenu(EDITSTATE *es, INT x, INT y) if (x == -1 && y == -1) /* passed via VK_APPS press/release */ { + POINT pt; RECT rc; + /* Windows places the menu at the edit's center in this case */ - WIN_GetRectangles( es->hwndSelf, COORDS_SCREEN, NULL, &rc ); - x = rc.left + (rc.right - rc.left) / 2; - y = rc.top + (rc.bottom - rc.top) / 2; + GetClientRect( es->hwndSelf, &rc ); + pt.x = rc.right / 2; + pt.y = rc.bottom / 2; + ClientToScreen( es->hwndSelf, &pt ); + x = pt.x; + y = pt.y; } if (!(es->flags & EF_FOCUSED))
1
0
0
0
Jacek Caban : user32: Use win32u to get and set MDI client info.
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: c0b62eb5aef8b58c903521685a155b224b38b6a9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c0b62eb5aef8b58c903521685a155b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 28 21:26:31 2022 +0200 user32: Use win32u to get and set MDI client info. --- dlls/user32/mdi.c | 20 ++------------------ dlls/user32/win.c | 24 +++--------------------- dlls/user32/win.h | 2 -- dlls/win32u/window.c | 8 ++++++++ include/ntuser.h | 12 ++++++++++++ 5 files changed, 25 insertions(+), 41 deletions(-) diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index d8d26a3b2f1..12dd61c5376 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -194,22 +194,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class = static MDICLIENTINFO *get_client_info( HWND client ) { - MDICLIENTINFO *ret = NULL; - WND *win = WIN_GetPtr( client ); - if (win) - { - if (win == WND_OTHER_PROCESS || win == WND_DESKTOP) - { - if (IsWindow(client)) WARN( "client %p belongs to other process\n", client ); - return NULL; - } - if (win->flags & WIN_ISMDICLIENT) - ret = ((MDICLIENTINFO **)win->wExtra)[1]; - else - WARN( "%p is not an MDI client\n", client ); - WIN_ReleasePtr( win ); - } - return ret; + return NtUserGetMDIClientInfo( client ); } static BOOL is_close_enabled(HWND hwnd, HMENU hSysMenu) @@ -1038,8 +1023,7 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM if (message == WM_NCCREATE) { if (!(ci = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ci) ))) return 0; - SetWindowLongPtrW( hwnd, sizeof(void *), (ULONG_PTR)ci ); - win_set_flags( hwnd, WIN_ISMDICLIENT, 0 ); + NtUserSetMDIClientInfo( hwnd, ci ); } return unicode ? DefWindowProcW( hwnd, message, wParam, lParam ) : DefWindowProcA( hwnd, message, wParam, lParam ); diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 23263166eeb..5cbef6d2342 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -128,7 +128,7 @@ BOOL is_desktop_window( HWND hwnd ) * or WND_OTHER_PROCESS if handle may be valid in other process. * If ret value is a valid pointer, it must be released with WIN_ReleasePtr. */ -WND *WIN_GetPtr( HWND hwnd ) +static WND *WIN_GetPtr( HWND hwnd ) { WND *ptr = (void *)NtUserCallTwoParam( HandleToUlong(hwnd), NTUSER_OBJ_WINDOW, NtUserGetHandlePtr ); if (ptr == WND_OTHER_PROCESS && is_desktop_window( hwnd )) ptr = WND_DESKTOP; @@ -139,7 +139,7 @@ WND *WIN_GetPtr( HWND hwnd ) /*********************************************************************** * WIN_ReleasePtr */ -void WIN_ReleasePtr( WND *ptr ) +static void WIN_ReleasePtr( WND *ptr ) { assert( ptr && ptr != OBJ_OTHER_PROCESS ); NtUserCallOneParam( 1, NtUserLock ); @@ -168,24 +168,6 @@ HWND WIN_IsCurrentThread( HWND hwnd ) } -/*********************************************************************** - * win_set_flags - * - * Set the flags of a window and return the previous value. - */ -UINT win_set_flags( HWND hwnd, UINT set_mask, UINT clear_mask ) -{ - UINT ret; - WND *ptr = WIN_GetPtr( hwnd ); - - if (!ptr || ptr == WND_OTHER_PROCESS || ptr == WND_DESKTOP) return 0; - ret = ptr->flags; - ptr->flags = (ret & ~clear_mask) | set_mask; - WIN_ReleasePtr( ptr ); - return ret; -} - - /*********************************************************************** * WIN_GetFullHandle * @@ -494,7 +476,7 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, POINT pos[2]; UINT id = 0; - if (!(win_get_flags( cs->hwndParent ) & WIN_ISMDICLIENT)) + if (!NtUserGetMDIClientInfo( cs->hwndParent )) { WARN("WS_EX_MDICHILD, but parent %p is not MDIClient\n", cs->hwndParent); return 0; diff --git a/dlls/user32/win.h b/dlls/user32/win.h index 8ef090fe983..5b744ade004 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -36,8 +36,6 @@ struct tagDIALOGINFO; /* Window functions */ extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN; -extern WND *WIN_GetPtr( HWND hwnd ) DECLSPEC_HIDDEN; -extern void WIN_ReleasePtr( WND *ptr ) DECLSPEC_HIDDEN; extern HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN; diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 41cfde752c7..ef8d3dea19e 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -5410,6 +5410,10 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code ) case NtUserCallHwnd_GetDialogInfo: return (ULONG_PTR)get_dialog_info( hwnd ); + case NtUserCallHwnd_GetMDIClientInfo: + if (!(win_get_flags( hwnd ) & WIN_ISMDICLIENT)) return 0; + return get_window_long_ptr( hwnd, sizeof(void *), FALSE ); + case NtUserCallHwnd_GetWindowContextHelpId: return get_window_context_help_id( hwnd ); @@ -5548,6 +5552,10 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code ) case NtUserCallHwndParam_SetDialogInfo: return set_dialog_info( hwnd, (void *)param ); + case NtUserCallHwndParam_SetMDIClientInfo: + NtUserSetWindowLongPtr( hwnd, sizeof(void *), param, FALSE ); + return win_set_flags( hwnd, WIN_ISMDICLIENT, 0 ); + case NtUserCallHwndParam_SetWindowContextHelpId: return set_window_context_help_id( hwnd, param ); diff --git a/include/ntuser.h b/include/ntuser.h index 65abfc65b18..882bd4fad30 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -1101,6 +1101,7 @@ enum NtUserCallHwnd_GetDefaultImeWindow, NtUserCallHwnd_GetDialogInfo, NtUserCallHwnd_GetDpiForWindow, + NtUserCallHwnd_GetMDIClientInfo, NtUserCallHwnd_GetParent, NtUserCallHwnd_GetWindowContextHelpId, NtUserCallHwnd_GetWindowDpiAwarenessContext, @@ -1148,6 +1149,11 @@ static inline UINT NtUserGetDpiForWindow( HWND hwnd ) return NtUserCallHwnd( hwnd, NtUserCallHwnd_GetDpiForWindow ); } +static inline void *NtUserGetMDIClientInfo( HWND hwnd ) +{ + return (void *)NtUserCallHwnd( hwnd, NtUserCallHwnd_GetMDIClientInfo ); +} + static inline HWND NtUserGetParent( HWND hwnd ) { return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetParent )); @@ -1228,6 +1234,7 @@ enum NtUserCallHwndParam_MonitorFromWindow, NtUserCallHwndParam_ScreenToClient, NtUserCallHwndParam_SetDialogInfo, + NtUserCallHwndParam_SetMDIClientInfo, NtUserCallHwndParam_SetWindowContextHelpId, NtUserCallHwndParam_SetWindowPixelFormat, NtUserCallHwndParam_ShowOwnedPopups, @@ -1394,6 +1401,11 @@ static inline void NtUserSetDialogInfo( HWND hwnd, void *info ) NtUserCallHwndParam( hwnd, (UINT_PTR)info, NtUserCallHwndParam_SetDialogInfo ); } +static inline void NtUserSetMDIClientInfo( HWND hwnd, void *info ) +{ + NtUserCallHwndParam( hwnd, (UINT_PTR)info, NtUserCallHwndParam_SetMDIClientInfo ); +} + static inline BOOL NtUserSetWindowContextHelpId( HWND hwnd, DWORD id ) { return NtUserCallHwndParam( hwnd, id, NtUserCallHwndParam_SetWindowContextHelpId );
1
0
0
0
Jacek Caban : user32: Store MDI client info on client heap.
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: 1bd73c6c3e2b8737b7377dd7be3dc7e7a13c2edf URL:
https://gitlab.winehq.org/wine/wine/-/commit/1bd73c6c3e2b8737b7377dd7be3dc7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 28 21:12:23 2022 +0200 user32: Store MDI client info on client heap. --- dlls/user32/mdi.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index cb278525f13..d8d26a3b2f1 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -127,7 +127,6 @@ typedef struct * states it must keep coherency with USER32 on its own. This is true for * Windows as well. */ - LONG reserved; UINT nActiveChildren; HWND hwndChildMaximized; HWND hwndActiveChild; @@ -187,7 +186,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class = L"MDIClient", /* name */ 0, /* style */ WINPROC_MDICLIENT, /* proc */ - sizeof(MDICLIENTINFO), /* extra */ + 2 * sizeof(void *), /* extra */ IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */ }; @@ -205,7 +204,7 @@ static MDICLIENTINFO *get_client_info( HWND client ) return NULL; } if (win->flags & WIN_ISMDICLIENT) - ret = (MDICLIENTINFO *)win->wExtra; + ret = ((MDICLIENTINFO **)win->wExtra)[1]; else WARN( "%p is not an MDI client\n", client ); WIN_ReleasePtr( win ); @@ -1036,7 +1035,12 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM if (!(ci = get_client_info( hwnd ))) { - if (message == WM_NCCREATE) win_set_flags( hwnd, WIN_ISMDICLIENT, 0 ); + if (message == WM_NCCREATE) + { + if (!(ci = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ci) ))) return 0; + SetWindowLongPtrW( hwnd, sizeof(void *), (ULONG_PTR)ci ); + win_set_flags( hwnd, WIN_ISMDICLIENT, 0 ); + } return unicode ? DefWindowProcW( hwnd, message, wParam, lParam ) : DefWindowProcA( hwnd, message, wParam, lParam ); } @@ -1077,7 +1081,7 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM HeapFree( GetProcessHeap(), 0, ci->child ); HeapFree( GetProcessHeap(), 0, ci->frameTitle ); - + HeapFree( GetProcessHeap(), 0, ci ); return 0; }
1
0
0
0
Jacek Caban : win32u: Introduce NtUserGetWindowSysSubMenu.
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: 224a8fc24ed79a52d69a2cb2cb71cf11b8564f55 URL:
https://gitlab.winehq.org/wine/wine/-/commit/224a8fc24ed79a52d69a2cb2cb71cf…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jul 28 19:21:53 2022 +0200 win32u: Introduce NtUserGetWindowSysSubMenu. And use it for MDI client implementation. --- dlls/user32/mdi.c | 15 ++++----------- dlls/win32u/menu.c | 11 +++++++++++ dlls/win32u/win32u_private.h | 1 + dlls/win32u/window.c | 3 +++ include/ntuser.h | 6 ++++++ 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index 11ba1382804..cb278525f13 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -1359,17 +1359,12 @@ LRESULT WINAPI DefFrameProcW( HWND hwnd, HWND hwndMDIClient, { /* control menu is between the frame system menu and * the first entry of menu bar */ - WND *wndPtr = WIN_GetPtr(hwnd); - - if( (wParam == VK_LEFT && GetMenu(hwnd) == next_menu->hmenuIn) || - (wParam == VK_RIGHT && GetSubMenu(wndPtr->hSysMenu, 0) == next_menu->hmenuIn) ) + if ((wParam == VK_LEFT && GetMenu(hwnd) == next_menu->hmenuIn) || + (wParam == VK_RIGHT && NtUserGetWindowSysSubMenu( hwnd ) == next_menu->hmenuIn)) { - WIN_ReleasePtr(wndPtr); - wndPtr = WIN_GetPtr(ci->hwndActiveChild); - next_menu->hmenuNext = GetSubMenu(wndPtr->hSysMenu, 0); + next_menu->hmenuNext = NtUserGetWindowSysSubMenu( ci->hwndActiveChild ); next_menu->hwndNext = ci->hwndActiveChild; } - WIN_ReleasePtr(wndPtr); } return 0; } @@ -1551,9 +1546,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message, if( wParam == VK_LEFT ) /* switch to frame system menu */ { - WND *wndPtr = WIN_GetPtr( parent ); - next_menu->hmenuNext = GetSubMenu( wndPtr->hSysMenu, 0 ); - WIN_ReleasePtr( wndPtr ); + next_menu->hmenuNext = NtUserGetWindowSysSubMenu( parent ); } if( wParam == VK_RIGHT ) /* to frame menu bar */ { diff --git a/dlls/win32u/menu.c b/dlls/win32u/menu.c index 641eb926e16..53dcf3ced8e 100644 --- a/dlls/win32u/menu.c +++ b/dlls/win32u/menu.c @@ -1619,6 +1619,17 @@ BOOL WINAPI NtUserSetSystemMenu( HWND hwnd, HMENU menu ) return TRUE; } +HMENU get_window_sys_sub_menu( HWND hwnd ) +{ + WND *win; + HMENU ret; + + if (!(win = get_win_ptr( hwnd )) || win == WND_OTHER_PROCESS || win == WND_DESKTOP) return 0; + ret = win->hSysMenu; + release_win_ptr( win ); + return get_sub_menu( ret, 0 ); +} + /********************************************************************** * NtUserSetMenuDefaultItem (win32u.@) */ diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 6e9a1926891..d4b86d1e6a9 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -289,6 +289,7 @@ extern UINT get_menu_bar_height( HWND hwnd, UINT width, INT org_x, INT org_y ) D extern BOOL get_menu_info( HMENU handle, MENUINFO *info ) DECLSPEC_HIDDEN; extern INT get_menu_item_count( HMENU handle ) DECLSPEC_HIDDEN; extern UINT get_menu_state( HMENU handle, UINT item_id, UINT flags ) DECLSPEC_HIDDEN; +extern HMENU get_window_sys_sub_menu( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL is_menu( HMENU handle ) DECLSPEC_HIDDEN; extern HWND is_menu_active(void) DECLSPEC_HIDDEN; extern LRESULT popup_menu_window_proc( HWND hwnd, UINT message, WPARAM wparam, diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 506af7530d3..41cfde752c7 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -5419,6 +5419,9 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code ) case NtUserCallHwnd_GetWindowInputContext: return HandleToUlong( get_window_input_context( hwnd )); + case NtUserCallHwnd_GetWindowSysSubMenu: + return HandleToUlong( get_window_sys_sub_menu( hwnd )); + case NtUserCallHwnd_GetWindowTextLength: return get_server_window_text( hwnd, NULL, 0 ); diff --git a/include/ntuser.h b/include/ntuser.h index 86e2d329eb9..65abfc65b18 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -1105,6 +1105,7 @@ enum NtUserCallHwnd_GetWindowContextHelpId, NtUserCallHwnd_GetWindowDpiAwarenessContext, NtUserCallHwnd_GetWindowInputContext, + NtUserCallHwnd_GetWindowSysSubMenu, NtUserCallHwnd_GetWindowTextLength, NtUserCallHwnd_IsWindow, NtUserCallHwnd_IsWindowEnabled, @@ -1163,6 +1164,11 @@ static inline HIMC NtUserGetWindowInputContext( HWND hwnd ) return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowInputContext )); } +static inline HMENU NtUserGetWindowSysSubMenu( HWND hwnd ) +{ + return UlongToHandle( NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowSysSubMenu )); +} + static inline INT NtUserGetWindowTextLength( HWND hwnd ) { return NtUserCallHwnd( hwnd, NtUserCallHwnd_GetWindowTextLength );
1
0
0
0
Nikolay Sivov : dwrite: Add ff00-ffef range to the fallback configuration.
by Alexandre Julliard
05 Aug '22
05 Aug '22
Module: wine Branch: master Commit: c4c3e9fee4cfdea61f54f1f4570027df2d0b5d8b URL:
https://gitlab.winehq.org/wine/wine/-/commit/c4c3e9fee4cfdea61f54f1f4570027…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Aug 4 23:31:27 2022 +0300 dwrite: Add ff00-ffef range to the fallback configuration. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/dwrite/analyzer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index e95c1689a98..d23153a2d5e 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -249,6 +249,9 @@ system_fallback_config[] = { "1800-18AF, 11660-1167F", L"Noto Sans Mongolian" }, { "3000-30FF, 31F0-31FF, 4E00-9FFF", L"Meiryo" }, + + /* Halfwidth and Fullwidth Forms */ + { "FF00-FFEF", L"Noto Sans CJK JP" }, }; struct text_source_context
1
0
0
0
Alistair Leslie-Hughes : xactengine3_7: Return error on invalid notification value.
by Alexandre Julliard
04 Aug '22
04 Aug '22
Module: wine Branch: master Commit: e43288348de170fef5dfd122675ba367dd7ea0ec URL:
https://gitlab.winehq.org/wine/wine/-/commit/e43288348de170fef5dfd122675ba3…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sun Jul 31 14:23:42 2022 +1000 xactengine3_7: Return error on invalid notification value. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/xactengine3_7/tests/xact3.c | 18 ++++++++++++++++++ dlls/xactengine3_7/xact_dll.c | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/dlls/xactengine3_7/tests/xact3.c b/dlls/xactengine3_7/tests/xact3.c index 6b66af59ff0..2a97f5f7c5c 100644 --- a/dlls/xactengine3_7/tests/xact3.c +++ b/dlls/xactengine3_7/tests/xact3.c @@ -208,6 +208,24 @@ static void test_notifications(void) hr = IXACT3Engine_Initialize(engine, ¶ms); ok(hr == S_OK, "Cannot initialize engine, hr %#lx\n", hr); + notification_desc.type = 0; + notification_desc.flags = 0; + notification_desc.pvContext = &prepared_data; + hr = IXACT3Engine_RegisterNotification(engine, ¬ification_desc); + ok(hr == E_INVALIDARG, "got hr %#lx\n", hr); + + hr = IXACT3Engine_UnRegisterNotification(engine, ¬ification_desc); + ok(hr == S_OK, "got hr %#lx\n", hr); + + notification_desc.type = XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT + 1; + notification_desc.flags = 0; + notification_desc.pvContext = &prepared_data; + hr = IXACT3Engine_RegisterNotification(engine, ¬ification_desc); + ok(hr == E_INVALIDARG, "got hr %#lx\n", hr); + + hr = IXACT3Engine_UnRegisterNotification(engine, ¬ification_desc); + ok(hr == S_OK, "got hr %#lx\n", hr); + prepared_data.type = XACTNOTIFICATIONTYPE_WAVEBANKPREPARED; prepared_data.thread_id = GetCurrentThreadId(); notification_desc.type = XACTNOTIFICATIONTYPE_WAVEBANKPREPARED; diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c index cd72f43949f..f2737e0a9bd 100644 --- a/dlls/xactengine3_7/xact_dll.c +++ b/dlls/xactengine3_7/xact_dll.c @@ -1517,6 +1517,10 @@ static HRESULT WINAPI IXACT3EngineImpl_RegisterNotification(IXACT3Engine *iface, TRACE("(%p)->(%p)\n", This, pNotificationDesc); + if (pNotificationDesc->type < XACTNOTIFICATIONTYPE_CUEPREPARED || + pNotificationDesc->type > XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT) + return E_INVALIDARG; + unwrap_notificationdesc(&fdesc, pNotificationDesc); This->contexts[pNotificationDesc->type] = pNotificationDesc->pvContext; fdesc.pvContext = This; @@ -1531,6 +1535,10 @@ static HRESULT WINAPI IXACT3EngineImpl_UnRegisterNotification(IXACT3Engine *ifac TRACE("(%p)->(%p)\n", This, pNotificationDesc); + if (pNotificationDesc->type < XACTNOTIFICATIONTYPE_CUEPREPARED || + pNotificationDesc->type > XACTNOTIFICATIONTYPE_WAVEBANKSTREAMING_INVALIDCONTENT) + return S_OK; + unwrap_notificationdesc(&fdesc, pNotificationDesc); fdesc.pvContext = This; return FACTAudioEngine_UnRegisterNotification(This->fact_engine, &fdesc);
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
60
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
Results per page:
10
25
50
100
200