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
May 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
907 discussions
Start a n
N
ew thread
Zebediah Figura : wined3d: Trace bind flags in wined3d_texture_init().
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: b646682a3da1d3e02a3224d5be85c92e61308141 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b646682a3da1d3e02a3224d5…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue May 10 15:02:57 2022 -0500 wined3d: Trace bind flags in wined3d_texture_init(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 49650f2839e..35688fcd0d9 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -3805,10 +3805,10 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc HRESULT hr; TRACE("texture %p, resource_type %s, format %s, multisample_type %#x, multisample_quality %#x, " - "usage %s, access %s, width %u, height %u, depth %u, layer_count %u, level_count %u, " + "usage %s, bind_flags %s, access %s, width %u, height %u, depth %u, layer_count %u, level_count %u, " "flags %#x, device %p, parent %p, parent_ops %p, sub_resources %p, texture_ops %p.\n", - texture, debug_d3dresourcetype(desc->resource_type), debug_d3dformat(desc->format), - desc->multisample_type, desc->multisample_quality, debug_d3dusage(desc->usage), + texture, debug_d3dresourcetype(desc->resource_type), debug_d3dformat(desc->format), desc->multisample_type, + desc->multisample_quality, debug_d3dusage(desc->usage), wined3d_debug_bind_flags(desc->bind_flags), wined3d_debug_resource_access(desc->access), desc->width, desc->height, desc->depth, layer_count, level_count, flags, device, parent, parent_ops, sub_resources, texture_ops);
1
0
0
0
Ziqing Hui : d2d1: Implement LoadVertexShader().
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: e9845d4fda0dacdd3f09874fd55105cdde9e8376 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e9845d4fda0dacdd3f09874f…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Tue May 10 12:48:40 2022 +0800 d2d1: Implement LoadVertexShader(). Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/d2d1_private.h | 10 ++++++++++ dlls/d2d1/effect.c | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index cb9ee6d5b80..b7e1a12b3b8 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -568,12 +568,22 @@ struct d2d_device void d2d_device_init(struct d2d_device *device, ID2D1Factory1 *factory, IDXGIDevice *dxgi_device) DECLSPEC_HIDDEN; +struct d2d_shader +{ + const GUID *id; + IUnknown *shader; +}; + struct d2d_effect_context { ID2D1EffectContext ID2D1EffectContext_iface; LONG refcount; struct d2d_device_context *device_context; + + struct d2d_shader *shaders; + size_t shaders_size; + size_t shader_count; }; void d2d_effect_context_init(struct d2d_effect_context *effect_context, diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 90e07c0810b..b87ae6bb77d 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -37,6 +37,15 @@ static inline struct d2d_effect_context *impl_from_ID2D1EffectContext(ID2D1Effec static void d2d_effect_context_cleanup(struct d2d_effect_context *effect_context) { + unsigned int i; + + for (i = 0; i < effect_context->shader_count; ++i) + { + if (effect_context->shaders[i].shader) + IUnknown_Release(effect_context->shaders[i].shader); + } + heap_free(effect_context->shaders); + ID2D1DeviceContext_Release(&effect_context->device_context->ID2D1DeviceContext_iface); } @@ -178,10 +187,37 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadPixelShader(ID2D1EffectC static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadVertexShader(ID2D1EffectContext *iface, REFGUID shader_id, const BYTE *buffer, UINT32 buffer_size) { - FIXME("iface %p, shader_id %s, buffer %p, buffer_size %u stub!\n", + struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface); + ID3D11VertexShader *vertex_shader; + struct d2d_shader *shader; + HRESULT hr; + + TRACE("iface %p, shader_id %s, buffer %p, buffer_size %u.\n", iface, debugstr_guid(shader_id), buffer, buffer_size); - return E_NOTIMPL; + if (FAILED(hr = ID3D11Device1_CreateVertexShader(effect_context->device_context->d3d_device, + buffer, buffer_size, NULL, &vertex_shader))) + { + WARN("Failed to create vertex shader, hr %#lx.\n", hr); + return hr; + } + + if (!d2d_array_reserve((void **)&effect_context->shaders, &effect_context->shaders_size, + effect_context->shader_count + 1, sizeof(*effect_context->shaders))) + { + ERR("Failed to resize shaders array.\n"); + ID3D11VertexShader_Release(vertex_shader); + return E_OUTOFMEMORY; + } + memset(effect_context->shaders + effect_context->shader_count, 0, + sizeof(*effect_context->shaders) * (effect_context->shaders_size - effect_context->shader_count)); + + effect_context->shader_count++; + shader = &effect_context->shaders[effect_context->shader_count - 1]; + shader->id = shader_id; + shader->shader = (IUnknown *)vertex_shader; + + return S_OK; } static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadComputeShader(ID2D1EffectContext *iface,
1
0
0
0
Ziqing Hui : d2d1: Implement ID2D1EffectContext_GetDpi().
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: ed4cc8ed81db02f37c208cf2019fc2d7b6fbb064 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ed4cc8ed81db02f37c208cf2…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Tue May 10 12:48:39 2022 +0800 d2d1: Implement ID2D1EffectContext_GetDpi(). Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/effect.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 714e8a92fd5..90e07c0810b 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -86,7 +86,11 @@ static ULONG STDMETHODCALLTYPE d2d_effect_context_Release(ID2D1EffectContext *if static void STDMETHODCALLTYPE d2d_effect_context_GetDpi(ID2D1EffectContext *iface, float *dpi_x, float *dpi_y) { - FIXME("iface %p, dpi_x %p, dpi_y %p stub!\n", iface, dpi_x, dpi_y); + struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface); + + TRACE("iface %p, dpi_x %p, dpi_y %p.\n", iface, dpi_x, dpi_y); + + ID2D1DeviceContext_GetDpi(&effect_context->device_context->ID2D1DeviceContext_iface, dpi_x, dpi_y); } static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateEffect(ID2D1EffectContext *iface,
1
0
0
0
Ziqing Hui : d2d1: Add stubs for ID2D1EffectContext.
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: 740bfd850132e2796558ff8fdc2c20268b5e878f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=740bfd850132e2796558ff8f…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Tue May 10 12:48:38 2022 +0800 d2d1: Add stubs for ID2D1EffectContext. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/d2d1_private.h | 31 ++++- dlls/d2d1/device.c | 18 +-- dlls/d2d1/effect.c | 289 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 319 insertions(+), 19 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=740bfd850132e2796558…
1
0
0
0
Jacek Caban : win32u: Move default WM_WINDOWPOSCHANGING implementation from user32.
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: b9a40c4b26407659d89c67388fe14fed60dc3e17 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b9a40c4b26407659d89c6738…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 11 21:26:52 2022 +0200 win32u: Move default WM_WINDOWPOSCHANGING implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/defwnd.c | 3 --- dlls/user32/win.h | 1 - dlls/user32/winpos.c | 25 ------------------------- dlls/win32u/defwnd.c | 22 ++++++++++++++++++++++ dlls/win32u/win32u_private.h | 1 + dlls/win32u/window.c | 2 +- 6 files changed, 24 insertions(+), 30 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 74dfa609bbd..c4263edac93 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -180,9 +180,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam ); break; - case WM_WINDOWPOSCHANGING: - return WINPOS_HandleWindowPosChanging( hwnd, (WINDOWPOS *)lParam ); - case WM_WINDOWPOSCHANGED: DEFWND_HandleWindowPosChanged( hwnd, (const WINDOWPOS *)lParam ); break; diff --git a/dlls/user32/win.h b/dlls/user32/win.h index 0c5bb2be5a8..c9ac3b8e977 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -60,7 +60,6 @@ static inline void WIN_ReleasePtr( WND *ptr ) extern LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode ) DECLSPEC_HIDDEN; -extern LONG WINPOS_HandleWindowPosChanging(HWND hwnd, WINDOWPOS *winpos) DECLSPEC_HIDDEN; extern HWND WINPOS_WindowFromPoint( HWND hwndScope, POINT pt, INT *hittest ) DECLSPEC_HIDDEN; extern void WINPOS_ActivateOtherWindow( HWND hwnd ) DECLSPEC_HIDDEN; extern void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam ) DECLSPEC_HIDDEN; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index cdcd03484cd..a5bc7d9ce17 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -653,31 +653,6 @@ void WINPOS_ActivateOtherWindow(HWND hwnd) } -/*********************************************************************** - * WINPOS_HandleWindowPosChanging - * - * Default handling for a WM_WINDOWPOSCHANGING. Called from DefWindowProc(). - */ -LONG WINPOS_HandleWindowPosChanging( HWND hwnd, WINDOWPOS *winpos ) -{ - LONG style = GetWindowLongW( hwnd, GWL_STYLE ); - - if (winpos->flags & SWP_NOSIZE) return 0; - if ((style & WS_THICKFRAME) || ((style & (WS_POPUP | WS_CHILD)) == 0)) - { - MINMAXINFO info = NtUserGetMinMaxInfo( hwnd ); - winpos->cx = min( winpos->cx, info.ptMaxTrackSize.x ); - winpos->cy = min( winpos->cy, info.ptMaxTrackSize.y ); - if (!(style & WS_MINIMIZE)) - { - winpos->cx = max( winpos->cx, info.ptMinTrackSize.x ); - winpos->cy = max( winpos->cy, info.ptMinTrackSize.y ); - } - } - return 0; -} - - /*********************************************************************** * BeginDeferWindowPos (USER32.@) */ diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index ec9a1685325..67472246960 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -195,6 +195,25 @@ static HICON set_window_icon( HWND hwnd, WPARAM type, HICON icon ) return ret; } +static LONG handle_window_pos_changing( HWND hwnd, WINDOWPOS *winpos ) +{ + LONG style = get_window_long( hwnd, GWL_STYLE ); + + if (winpos->flags & SWP_NOSIZE) return 0; + if ((style & WS_THICKFRAME) || ((style & (WS_POPUP | WS_CHILD)) == 0)) + { + MINMAXINFO info = get_min_max_info( hwnd ); + winpos->cx = min( winpos->cx, info.ptMaxTrackSize.x ); + winpos->cy = min( winpos->cy, info.ptMaxTrackSize.y ); + if (!(style & WS_MINIMIZE)) + { + winpos->cx = max( winpos->cx, info.ptMinTrackSize.x ); + winpos->cy = max( winpos->cy, info.ptMinTrackSize.y ); + } + } + return 0; +} + static LRESULT handle_sys_command( HWND hwnd, WPARAM wparam, LPARAM lparam ) { if (!is_window_enabled( hwnd )) return 0; @@ -255,6 +274,9 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, break; } + case WM_WINDOWPOSCHANGING: + return handle_window_pos_changing( hwnd, (WINDOWPOS *)lparam ); + case WM_PAINTICON: case WM_PAINT: { diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 63eca06ecd6..e459e6df6bd 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -434,6 +434,7 @@ extern HWND get_parent( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; extern DPI_AWARENESS_CONTEXT get_window_dpi_awareness_context( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL get_window_placement( HWND hwnd, WINDOWPLACEMENT *placement ) DECLSPEC_HIDDEN; +extern MINMAXINFO get_min_max_info( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND get_window_relative( HWND hwnd, UINT rel ) DECLSPEC_HIDDEN; extern DWORD get_window_thread( HWND hwnd, DWORD *process ) DECLSPEC_HIDDEN; extern HWND is_current_process_window( HWND hwnd ) DECLSPEC_HIDDEN; diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 94cdd7f7280..31512c03e15 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -3657,7 +3657,7 @@ static void send_parent_notify( HWND hwnd, UINT msg ) * * Get the minimized and maximized information for a window. */ -static MINMAXINFO get_min_max_info( HWND hwnd ) +MINMAXINFO get_min_max_info( HWND hwnd ) { LONG style = get_window_long( hwnd, GWL_STYLE ); LONG exstyle = get_window_long( hwnd, GWL_EXSTYLE );
1
0
0
0
Jacek Caban : win32u: Move default WM_ERASEBKGND implementation from user32.
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: 63ce060e5b33ca4b58d508be11af4d3c214fae33 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=63ce060e5b33ca4b58d508be…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 11 21:00:01 2022 +0200 win32u: Move default WM_ERASEBKGND implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/defwnd.c | 19 ------------------- dlls/win32u/defwnd.c | 28 ++++++++++++++++++++++++++++ dlls/win32u/input.c | 9 --------- dlls/win32u/win32u_private.h | 1 + 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index af2b32614bc..74dfa609bbd 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -266,25 +266,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa DEFWND_Print(hwnd, (HDC)wParam, lParam); return 0; - case WM_ERASEBKGND: - case WM_ICONERASEBKGND: - { - RECT rect; - HDC hdc = (HDC)wParam; - HBRUSH hbr = (HBRUSH)GetClassLongPtrW( hwnd, GCLP_HBRBACKGROUND ); - if (!hbr) return 0; - - if (GetClassLongW( hwnd, GCL_STYLE ) & CS_PARENTDC) - { - /* can't use GetClipBox with a parent DC or we fill the whole parent */ - GetClientRect( hwnd, &rect ); - DPtoLP( hdc, (LPPOINT)&rect, 2 ); - } - else GetClipBox( hdc, &rect ); - FillRect( hdc, &rect, hbr ); - return 1; - } - case WM_CTLCOLORMSGBOX: case WM_CTLCOLOREDIT: case WM_CTLCOLORLISTBOX: diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 72d9aa40164..ec9a1685325 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -31,6 +31,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(win); +void fill_rect( HDC dc, const RECT *rect, HBRUSH hbrush ) +{ + HBRUSH prev_brush; + + prev_brush = NtGdiSelectBrush( dc, hbrush ); + NtGdiPatBlt( dc, rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top, PATCOPY ); + if (prev_brush) NtGdiSelectBrush( dc, prev_brush ); +} + /*********************************************************************** * AdjustWindowRectEx (win32u.so) */ @@ -310,6 +319,25 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, result = send_message( get_parent( hwnd ), WM_MOUSEWHEEL, wparam, lparam ); break; + case WM_ERASEBKGND: + case WM_ICONERASEBKGND: + { + RECT rect; + HDC hdc = (HDC)wparam; + HBRUSH hbr = UlongToHandle( get_class_long( hwnd, GCLP_HBRBACKGROUND, FALSE )); + if (!hbr) break; + + if (get_class_long( hwnd, GCL_STYLE, FALSE ) & CS_PARENTDC) + { + /* can't use GetClipBox with a parent DC or we fill the whole parent */ + get_client_rect( hwnd, &rect ); + NtGdiTransformPoints( hdc, (POINT *)&rect, (POINT *)&rect, 1, NtGdiDPtoLP ); + } + else NtGdiGetAppClipBox( hdc, &rect ); + fill_rect( hdc, &rect, hbr ); + return 1; + } + case WM_GETDLGCODE: break; diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index 877e3f1a064..2b196fb5b1d 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -1799,15 +1799,6 @@ static void display_caret( HWND hwnd, const RECT *r ) NtUserReleaseDC( hwnd, dc ); } -static void fill_rect( HDC dc, const RECT *rect, HBRUSH hbrush ) -{ - HBRUSH prev_brush; - - prev_brush = NtGdiSelectBrush( dc, hbrush ); - NtGdiPatBlt( dc, rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top, PATCOPY ); - if (prev_brush) NtGdiSelectBrush( dc, prev_brush ); -} - static unsigned int get_caret_registry_timeout(void) { char value_buffer[FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[11 * sizeof(WCHAR)])]; diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index ea6d67750b4..63eca06ecd6 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -353,6 +353,7 @@ extern void register_window_surface( struct window_surface *old, /* defwnd.c */ extern LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi ) DECLSPEC_HIDDEN; +extern void fill_rect( HDC dc, const RECT *rect, HBRUSH hbrush ) DECLSPEC_HIDDEN; /* hook.c */ extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : win32u: Move more default window commands from user32.
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: 135e3176b64eb0ea139f40adb7f5b1c3e89e3577 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=135e3176b64eb0ea139f40ad…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 11 20:48:07 2022 +0200 win32u: Move more default window commands from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/defwnd.c | 43 ------------------------------------------- dlls/win32u/defwnd.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index fdb100c9556..af2b32614bc 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -266,46 +266,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa DEFWND_Print(hwnd, (HDC)wParam, lParam); return 0; - case WM_SYNCPAINT: - NtUserRedrawWindow ( hwnd, NULL, 0, RDW_ERASENOW | RDW_ERASE | RDW_ALLCHILDREN ); - return 0; - - case WM_SETREDRAW: - if (wParam) WIN_SetStyle( hwnd, WS_VISIBLE, 0 ); - else - { - NtUserRedrawWindow( hwnd, NULL, 0, RDW_ALLCHILDREN | RDW_VALIDATE ); - WIN_SetStyle( hwnd, 0, WS_VISIBLE ); - } - return 0; - - case WM_CLOSE: - NtUserDestroyWindow( hwnd ); - return 0; - - case WM_MOUSEACTIVATE: - if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) - { - LONG ret = SendMessageW( GetParent(hwnd), WM_MOUSEACTIVATE, wParam, lParam ); - if (ret) return ret; - } - - /* Caption clicks are handled by NC_HandleNCLButtonDown() */ - return ( HIWORD(lParam) == WM_LBUTTONDOWN && LOWORD(lParam) == HTCAPTION ? MA_NOACTIVATE : MA_ACTIVATE ); - - case WM_ACTIVATE: - /* The default action in Windows is to set the keyboard focus to - * the window, if it's being activated and not minimized */ - if (LOWORD(wParam) != WA_INACTIVE) { - if (!IsIconic(hwnd)) NtUserSetFocus( hwnd ); - } - break; - - case WM_MOUSEWHEEL: - if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) - return SendMessageW( GetParent(hwnd), WM_MOUSEWHEEL, wParam, lParam ); - break; - case WM_ERASEBKGND: case WM_ICONERASEBKGND: { @@ -325,9 +285,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa return 1; } - case WM_GETDLGCODE: - return 0; - case WM_CTLCOLORMSGBOX: case WM_CTLCOLOREDIT: case WM_CTLCOLORLISTBOX: diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index c345a6ab188..72d9aa40164 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -270,6 +270,49 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, break; } + case WM_SYNCPAINT: + NtUserRedrawWindow ( hwnd, NULL, 0, RDW_ERASENOW | RDW_ERASE | RDW_ALLCHILDREN ); + return 0; + + case WM_SETREDRAW: + if (wparam) set_window_style( hwnd, WS_VISIBLE, 0 ); + else + { + NtUserRedrawWindow( hwnd, NULL, 0, RDW_ALLCHILDREN | RDW_VALIDATE ); + set_window_style( hwnd, 0, WS_VISIBLE ); + } + return 0; + + case WM_CLOSE: + NtUserDestroyWindow( hwnd ); + return 0; + + case WM_MOUSEACTIVATE: + if (get_window_long( hwnd, GWL_STYLE ) & WS_CHILD) + { + result = send_message( get_parent(hwnd), WM_MOUSEACTIVATE, wparam, lparam ); + if (result) break; + } + + /* Caption clicks are handled by NC_HandleNCLButtonDown() */ + result = HIWORD(lparam) == WM_LBUTTONDOWN && LOWORD(lparam) == HTCAPTION ? + MA_NOACTIVATE : MA_ACTIVATE; + break; + + case WM_ACTIVATE: + /* The default action in Windows is to set the keyboard focus to + * the window, if it's being activated and not minimized */ + if (LOWORD(wparam) != WA_INACTIVE && !is_iconic( hwnd )) NtUserSetFocus( hwnd ); + break; + + case WM_MOUSEWHEEL: + if (get_window_long( hwnd, GWL_STYLE ) & WS_CHILD) + result = send_message( get_parent( hwnd ), WM_MOUSEWHEEL, wparam, lparam ); + break; + + case WM_GETDLGCODE: + break; + case WM_SETTEXT: result = set_window_text( hwnd, (void *)lparam, ansi ); break;
1
0
0
0
Jacek Caban : win32u: Move default WM_PAINT implementation from user32.
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: 0e0438bfaaee58d999340fd91db2bc5fcab433dc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0e0438bfaaee58d999340fd9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 11 20:39:30 2022 +0200 win32u: Move default WM_PAINT implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/defwnd.c | 25 ------------------------- dlls/win32u/defwnd.c | 26 +++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 67cb77a3121..fdb100c9556 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -266,31 +266,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa DEFWND_Print(hwnd, (HDC)wParam, lParam); return 0; - case WM_PAINTICON: - case WM_PAINT: - { - PAINTSTRUCT ps; - HDC hdc = NtUserBeginPaint( hwnd, &ps ); - if( hdc ) - { - HICON hIcon; - if (IsIconic(hwnd) && ((hIcon = (HICON)GetClassLongPtrW( hwnd, GCLP_HICON))) ) - { - RECT rc; - int x, y; - - GetClientRect( hwnd, &rc ); - x = (rc.right - rc.left - GetSystemMetrics(SM_CXICON))/2; - y = (rc.bottom - rc.top - GetSystemMetrics(SM_CYICON))/2; - TRACE("Painting class icon: vis rect=(%s)\n", - wine_dbgstr_rect(&ps.rcPaint)); - DrawIcon( hdc, x, y, hIcon ); - } - NtUserEndPaint( hwnd, &ps ); - } - return 0; - } - case WM_SYNCPAINT: NtUserRedrawWindow ( hwnd, NULL, 0, RDW_ERASENOW | RDW_ERASE | RDW_ALLCHILDREN ); return 0; diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 3aa5a8286b3..c345a6ab188 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -243,7 +243,31 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, if (user_callbacks) user_callbacks->free_win_ptr( win ); win->pScroll = NULL; release_win_ptr( win ); - return 0; + break; + } + + case WM_PAINTICON: + case WM_PAINT: + { + PAINTSTRUCT ps; + HDC hdc = NtUserBeginPaint( hwnd, &ps ); + if (hdc) + { + HICON icon; + if (is_iconic(hwnd) && ((icon = UlongToHandle( get_class_long( hwnd, GCLP_HICON, FALSE ))))) + { + RECT rc; + int x, y; + + get_client_rect( hwnd, &rc ); + x = (rc.right - rc.left - get_system_metrics( SM_CXICON )) / 2; + y = (rc.bottom - rc.top - get_system_metrics( SM_CYICON )) / 2; + TRACE( "Painting class icon: vis rect=(%s)\n", wine_dbgstr_rect(&ps.rcPaint) ); + NtUserDrawIconEx( hdc, x, y, icon, 0, 0, 0, 0, DI_NORMAL | DI_COMPAT | DI_DEFAULTSIZE ); + } + NtUserEndPaint( hwnd, &ps ); + } + break; } case WM_SETTEXT:
1
0
0
0
Jacek Caban : win32u: Move default WM_GETICON implementation from user32.
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: 1f296397cafbbd5bcf59f01bdf739ccc4a3658ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1f296397cafbbd5bcf59f01b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 11 20:14:50 2022 +0200 win32u: Move default WM_GETICON implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/defwnd.c | 30 +++--------------------------- dlls/win32u/defwnd.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 047822d00d6..67cb77a3121 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -262,9 +262,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa case WM_NCACTIVATE: return NC_HandleNCActivate( hwnd, wParam, lParam ); - case WM_NCDESTROY: - return NtUserMessageCall( hwnd, msg, wParam, lParam, 0, NtUserDefWindowProc, FALSE ); - case WM_PRINT: DEFWND_Print(hwnd, (HDC)wParam, lParam); return 0; @@ -524,30 +521,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa return res; } - case WM_GETICON: - { - HICON ret; - WND *wndPtr = WIN_GetPtr( hwnd ); - - switch(wParam) - { - case ICON_SMALL: - ret = wndPtr->hIconSmall; - break; - case ICON_BIG: - ret = wndPtr->hIcon; - break; - case ICON_SMALL2: - ret = wndPtr->hIconSmall ? wndPtr->hIconSmall : wndPtr->hIconSmall2; - break; - default: - ret = 0; - break; - } - WIN_ReleasePtr( wndPtr ); - return (LRESULT)ret; - } - case WM_HELP: SendMessageW( GetParent(hwnd), msg, wParam, lParam ); break; @@ -614,6 +587,9 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa break; } + default: + return NtUserMessageCall( hwnd, msg, wParam, lParam, 0, NtUserDefWindowProc, FALSE ); + } return 0; diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 1fa80928c65..3aa5a8286b3 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -112,6 +112,33 @@ static BOOL set_window_text( HWND hwnd, const void *text, BOOL ansi ) return TRUE; } +static HICON get_window_icon( HWND hwnd, WPARAM type ) +{ + HICON ret; + WND *win; + + if (!(win = get_win_ptr( hwnd ))) return 0; + + switch(type) + { + case ICON_SMALL: + ret = win->hIconSmall; + break; + case ICON_BIG: + ret = win->hIcon; + break; + case ICON_SMALL2: + ret = win->hIconSmall ? win->hIconSmall : win->hIconSmall2; + break; + default: + ret = 0; + break; + } + + release_win_ptr( win ); + return ret; +} + static HICON set_window_icon( HWND hwnd, WPARAM type, HICON icon ) { HICON ret = 0; @@ -227,6 +254,10 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, result = (LRESULT)set_window_icon( hwnd, wparam, (HICON)lparam ); break; + case WM_GETICON: + result = (LRESULT)get_window_icon( hwnd, wparam ); + break; + case WM_SYSCOMMAND: result = handle_sys_command( hwnd, wparam, lparam ); break;
1
0
0
0
Paul Gofman : crypt32/tests: Handle CERT_NAME_SEARCH_ALL_NAMES_FLAG being unsupported before Win8.
by Alexandre Julliard
12 May '22
12 May '22
Module: wine Branch: master Commit: fc4067a2ac897c8252a61c2e29bdddfab9f0e176 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fc4067a2ac897c8252a61c2e…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed May 11 11:42:45 2022 -0500 crypt32/tests: Handle CERT_NAME_SEARCH_ALL_NAMES_FLAG being unsupported before Win8. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52961
Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/tests/str.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c index 5fb05bdb836..29a948ed0e9 100644 --- a/dlls/crypt32/tests/str.c +++ b/dlls/crypt32/tests/str.c @@ -864,6 +864,13 @@ static void test_CertGetNameString_value_(unsigned int line, PCCERT_CONTEXT cont expectedW[expected_len++] = 0; len = CertGetNameStringA(context, type, flags, type_para, NULL, 0); + if (flags & CERT_NAME_SEARCH_ALL_NAMES_FLAG && ((type == CERT_NAME_DNS_TYPE && len < expected_len) + || (type != CERT_NAME_DNS_TYPE && len > expected_len))) + { + /* Supported since Win8. */ + win_skip("line %u: CERT_NAME_SEARCH_ALL_NAMES_FLAG is not supported.\n", line); + return; + } ok(len == expected_len, "line %u: unexpected length %ld, expected %ld.\n", line, len, expected_len); memset(str, 0xcc, len); retlen = CertGetNameStringA(context, type, flags, type_para, str, len);
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
...
91
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
Results per page:
10
25
50
100
200