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
January 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
726 discussions
Start a n
N
ew thread
Alexandre Julliard : widl: Avoid using Windows types where possible.
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: a7f0e61e6c5ed90299f7731906341cce2b415634 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a7f0e61e6c5ed90299f77319…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 24 12:17:22 2022 +0100 widl: Avoid using Windows types where possible. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/client.c | 2 +- tools/widl/hash.c | 10 +- tools/widl/hash.h | 12 +- tools/widl/header.c | 14 +- tools/widl/parser.l | 4 +- tools/widl/parser.y | 6 +- tools/widl/proxy.c | 6 +- tools/widl/register.c | 18 +- tools/widl/server.c | 2 +- tools/widl/typegen.c | 2 +- tools/widl/typelib.c | 2 +- tools/widl/typelib_struct.h | 538 ++++++++++++++++++++++---------------------- tools/widl/typetree.c | 18 +- tools/widl/utils.h | 2 +- tools/widl/widl.c | 8 +- tools/widl/widltypes.h | 18 +- tools/widl/write_msft.c | 93 +++----- 17 files changed, 368 insertions(+), 387 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a7f0e61e6c5ed90299f7…
1
0
0
0
Alexandre Julliard : wrc: Avoid using Windows types where possible.
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: dbfdcb13ffce0ff0c579f1c816d3b9e1c9faf6be URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dbfdcb13ffce0ff0c579f1c8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jan 24 10:36:15 2022 +0100 wrc: Avoid using Windows types where possible. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/wrc/dumpres.c | 2 +- tools/wrc/genres.c | 4 +- tools/wrc/newstruc.c | 26 +++++----- tools/wrc/newstruc.h | 6 +-- tools/wrc/parser.y | 4 +- tools/wrc/po.c | 17 +++--- tools/wrc/wrctypes.h | 142 +++++++++++++++++++++++++-------------------------- 7 files changed, 100 insertions(+), 101 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=dbfdcb13ffce0ff0c579…
1
0
0
0
Dean M Greer : winemac.drv: Fix compile with pre macOS 10.12 SDKs.
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: 2d784c85481345202d477e3e8c48203b5d59ab46 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d784c85481345202d477e3e…
Author: Dean M Greer <gcenx83(a)gmail.com> Date: Sun Jan 23 13:58:38 2022 -0500 winemac.drv: Fix compile with pre macOS 10.12 SDKs. Fixes a regression introduced by e58b1a2b395b56859157e7dd8d08cca4448f66c9. Signed-off-by: Dean M Greer <gcenx83(a)gmail.com> Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winemac.drv/cocoa_app.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/winemac.drv/cocoa_app.h b/dlls/winemac.drv/cocoa_app.h index e5caad00a87..52c91c0621f 100644 --- a/dlls/winemac.drv/cocoa_app.h +++ b/dlls/winemac.drv/cocoa_app.h @@ -56,6 +56,7 @@ #define NSWindowStyleMaskResizable NSResizableWindowMask #define NSWindowStyleMaskTitled NSTitledWindowMask #define NSWindowStyleMaskUtilityWindow NSUtilityWindowMask +#define NSWindowStyleMaskNonactivatingPanel NSNonactivatingPanelMask #endif #define ERR(...) do { if (macdrv_err_on) LogError(__func__, __VA_ARGS__); } while (false)
1
0
0
0
Huw Davies : winepulse: Remove unused member "mute".
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: 0863a8b0a875a5c7023c2e1703d1771c06d6af21 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0863a8b0a875a5c7023c2e17…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jan 24 08:44:19 2022 +0000 winepulse: Remove unused member "mute". Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winepulse.drv/pulse.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c index 356f68e0db2..f32f2a3d26c 100644 --- a/dlls/winepulse.drv/pulse.c +++ b/dlls/winepulse.drv/pulse.c @@ -56,7 +56,6 @@ struct pulse_stream AUDCLNT_SHAREMODE share; HANDLE event; float vol[PA_CHANNELS_MAX]; - BOOL mute; INT32 locked; BOOL started;
1
0
0
0
Nikolay Sivov : wshom: Use CRT allocation functions.
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: 82198731fca18002c0483241c2e479843dbe5753 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=82198731fca18002c0483241…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 24 11:35:43 2022 +0300 wshom: Use CRT allocation functions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wshom.ocx/shell.c | 103 ++++++++++++++++++++++++------------------------- 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/dlls/wshom.ocx/shell.c b/dlls/wshom.ocx/shell.c index e8fcba72505..1ee74577310 100644 --- a/dlls/wshom.ocx/shell.c +++ b/dlls/wshom.ocx/shell.c @@ -24,7 +24,6 @@ #include "dispex.h" #include "wine/debug.h" -#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(wshom); @@ -49,7 +48,7 @@ typedef struct LONG ref; IShellLinkW *link; - BSTR path_link; + WCHAR *path_link; } WshShortcut; typedef struct @@ -130,7 +129,7 @@ static ULONG WINAPI WshExec_Release(IWshExec *iface) if (!ref) { CloseHandle(This->info.hThread); CloseHandle(This->info.hProcess); - heap_free(This); + free(This); } return ref; @@ -321,24 +320,25 @@ static const IWshExecVtbl WshExecVtbl = { static HRESULT WshExec_create(BSTR command, IWshExec **ret) { STARTUPINFOW si = {0}; - WshExecImpl *This; + WshExecImpl *object; *ret = NULL; - This = heap_alloc(sizeof(*This)); - if (!This) + if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY; - This->IWshExec_iface.lpVtbl = &WshExecVtbl; - This->ref = 1; + object->IWshExec_iface.lpVtbl = &WshExecVtbl; + object->ref = 1; - if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &This->info)) { - heap_free(This); + if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &object->info)) + { + free(object); return HRESULT_FROM_WIN32(GetLastError()); } - init_classinfo(&CLSID_WshExec, (IUnknown *)&This->IWshExec_iface, &This->classinfo); - *ret = &This->IWshExec_iface; + init_classinfo(&CLSID_WshExec, (IUnknown *)&object->IWshExec_iface, &object->classinfo); + *ret = &object->IWshExec_iface; + return S_OK; } @@ -383,7 +383,7 @@ static ULONG WINAPI WshEnvironment_Release(IWshEnvironment *iface) TRACE("(%p) ref = %d\n", This, ref); if (!ref) - heap_free(This); + free(This); return ref; } @@ -519,16 +519,16 @@ static const IWshEnvironmentVtbl WshEnvironmentVtbl = { static HRESULT WshEnvironment_Create(IWshEnvironment **env) { - WshEnvironment *This; + WshEnvironment *object; - This = heap_alloc(sizeof(*This)); - if (!This) return E_OUTOFMEMORY; + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; - This->IWshEnvironment_iface.lpVtbl = &WshEnvironmentVtbl; - This->ref = 1; + object->IWshEnvironment_iface.lpVtbl = &WshEnvironmentVtbl; + object->ref = 1; - init_classinfo(&IID_IWshEnvironment, (IUnknown *)&This->IWshEnvironment_iface, &This->classinfo); - *env = &This->IWshEnvironment_iface; + init_classinfo(&IID_IWshEnvironment, (IUnknown *)&object->IWshEnvironment_iface, &object->classinfo); + *env = &object->IWshEnvironment_iface; return S_OK; } @@ -574,7 +574,7 @@ static ULONG WINAPI WshCollection_Release(IWshCollection *iface) TRACE("(%p) ref = %d\n", This, ref); if (!ref) - heap_free(This); + free(This); return ref; } @@ -718,16 +718,16 @@ static const IWshCollectionVtbl WshCollectionVtbl = { static HRESULT WshCollection_Create(IWshCollection **collection) { - WshCollection *This; + WshCollection *object; - This = heap_alloc(sizeof(*This)); - if (!This) return E_OUTOFMEMORY; + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; - This->IWshCollection_iface.lpVtbl = &WshCollectionVtbl; - This->ref = 1; + object->IWshCollection_iface.lpVtbl = &WshCollectionVtbl; + object->ref = 1; - init_classinfo(&IID_IWshCollection, (IUnknown *)&This->IWshCollection_iface, &This->classinfo); - *collection = &This->IWshCollection_iface; + init_classinfo(&IID_IWshCollection, (IUnknown *)&object->IWshCollection_iface, &object->classinfo); + *collection = &object->IWshCollection_iface; return S_OK; } @@ -775,9 +775,9 @@ static ULONG WINAPI WshShortcut_Release(IWshShortcut *iface) if (!ref) { - SysFreeString(This->path_link); IShellLinkW_Release(This->link); - heap_free(This); + free(This->path_link); + free(This); } return ref; @@ -1070,35 +1070,34 @@ static const IWshShortcutVtbl WshShortcutVtbl = { static HRESULT WshShortcut_Create(const WCHAR *path, IDispatch **shortcut) { - WshShortcut *This; + WshShortcut *object; HRESULT hr; *shortcut = NULL; - This = heap_alloc(sizeof(*This)); - if (!This) return E_OUTOFMEMORY; + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; - This->IWshShortcut_iface.lpVtbl = &WshShortcutVtbl; - This->ref = 1; + object->IWshShortcut_iface.lpVtbl = &WshShortcutVtbl; + object->ref = 1; - hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - &IID_IShellLinkW, (void**)&This->link); + hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (void **)&object->link); if (FAILED(hr)) { - heap_free(This); + free(object); return hr; } - This->path_link = SysAllocString(path); - if (!This->path_link) + object->path_link = wcsdup(path); + if (!object->path_link) { - IShellLinkW_Release(This->link); - heap_free(This); + IShellLinkW_Release(object->link); + free(object); return E_OUTOFMEMORY; } - init_classinfo(&IID_IWshShortcut, (IUnknown *)&This->IWshShortcut_iface, &This->classinfo); - *shortcut = (IDispatch*)&This->IWshShortcut_iface; + init_classinfo(&IID_IWshShortcut, (IUnknown *)&object->IWshShortcut_iface, &object->classinfo); + *shortcut = (IDispatch *)&object->IWshShortcut_iface; return S_OK; } @@ -1220,7 +1219,7 @@ static WCHAR *split_command( BSTR cmd, WCHAR **params ) WCHAR *ret, *ptr; BOOL in_quotes = FALSE; - if (!(ret = heap_alloc((lstrlenW(cmd) + 1) * sizeof(WCHAR)))) return NULL; + if (!(ret = malloc((lstrlenW(cmd) + 1) * sizeof(WCHAR)))) return NULL; lstrcpyW( ret, cmd ); *params = NULL; @@ -1283,7 +1282,7 @@ static HRESULT WINAPI WshShell3_Run(IWshShell3 *iface, BSTR cmd, VARIANT *style, info.nShow = V_I4(&s); ret = ShellExecuteExW(&info); - heap_free( file ); + free(file); if (!ret) { TRACE("ShellExecute failed, %d\n", GetLastError()); @@ -1454,7 +1453,7 @@ static HRESULT split_reg_path(const WCHAR *path, WCHAR **subkey, WCHAR **value) unsigned int len = *value - *subkey - 1; WCHAR *ret; - ret = heap_alloc((len + 1)*sizeof(WCHAR)); + ret = malloc((len + 1)*sizeof(WCHAR)); if (!ret) return E_OUTOFMEMORY; @@ -1494,7 +1493,7 @@ static HRESULT WINAPI WshShell3_RegRead(IWshShell3 *iface, BSTR name, VARIANT *v if (ret == ERROR_SUCCESS) { void *data; - data = heap_alloc(datalen); + data = malloc(datalen); if (!data) { hr = E_OUTOFMEMORY; goto fail; @@ -1502,7 +1501,7 @@ static HRESULT WINAPI WshShell3_RegRead(IWshShell3 *iface, BSTR name, VARIANT *v ret = RegGetValueW(root, subkey, val, RRF_RT_ANY, &type, data, &datalen); if (ret) { - heap_free(data); + free(data); hr = HRESULT_FROM_WIN32(ret); goto fail; } @@ -1592,7 +1591,7 @@ static HRESULT WINAPI WshShell3_RegRead(IWshShell3 *iface, BSTR name, VARIANT *v hr = E_FAIL; }; - heap_free(data); + free(data); if (FAILED(hr)) VariantInit(value); } @@ -1601,7 +1600,7 @@ static HRESULT WINAPI WshShell3_RegRead(IWshShell3 *iface, BSTR name, VARIANT *v fail: if (val) - heap_free(subkey); + free(subkey); return hr; } @@ -1684,7 +1683,7 @@ static HRESULT WINAPI WshShell3_RegWrite(IWshShell3 *iface, BSTR name, VARIANT * fail: VariantClear(&v); if (val) - heap_free(subkey); + free(subkey); return hr; }
1
0
0
0
Zhiyi Zhang : comctl32/propsheet: Handle page dialog tab texture in DefDlgProc().
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: d1c09903446b9a9d275f632170ab47868347eeb2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d1c09903446b9a9d275f6321…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jan 24 15:47:43 2022 +0800 comctl32/propsheet: Handle page dialog tab texture in DefDlgProc(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/propsheet.c | 164 ---------------------------------------------- 1 file changed, 164 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 82c0a3cc576..556d63f2c75 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -63,7 +63,6 @@ #include "prsht.h" #include "comctl32.h" #include "uxtheme.h" -#include "vsstyle.h" #include "wine/debug.h" @@ -141,7 +140,6 @@ typedef struct */ static const WCHAR PropSheetInfoStr[] = L"PropertySheetInfo"; -static const WCHAR PropSheetPageBackgroundBrush[] = L"PropSheetPageBackgroundBrush"; #define PSP_INTERNAL_UNICODE 0x80000000 @@ -1198,136 +1196,6 @@ PROPSHEET_WizardSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, return DefSubclassProc(hwnd, uMsg, wParam, lParam); } -static HBRUSH get_propsheet_background_brush(HWND hwnd) -{ - HBITMAP bitmap, old_bitmap; - HDC hdc, hdc_screen; - HBRUSH brush; - HTHEME theme; - HRESULT hr; - RECT rect; - SIZE size; - - brush = GetPropW(hwnd, PropSheetPageBackgroundBrush); - if (brush) - return brush; - - theme = OpenThemeData(NULL, L"Tab"); - if (!theme) - return NULL; - - hr = GetThemePartSize(theme, NULL, TABP_BODY, 0, NULL, TS_TRUE, &size); - if (FAILED(hr)) - { - size.cx = 10; - size.cy = 600; - } - - hdc_screen = GetDC(NULL); - hdc = CreateCompatibleDC(hdc_screen); - bitmap = CreateCompatibleBitmap(hdc_screen, size.cx, size.cy); - old_bitmap = SelectObject(hdc, bitmap); - - SetRect(&rect, 0, 0, size.cx, size.cy); - /* FIXME: XP draws the tab body bitmap directly without transparency even if there is */ - FillRect(hdc, &rect, GetSysColorBrush(COLOR_3DFACE)); - hr = DrawThemeBackground(theme, hdc, TABP_BODY, 0, &rect, NULL); - if (SUCCEEDED(hr)) - { - brush = CreatePatternBrush(bitmap); - SetPropW(hwnd, PropSheetPageBackgroundBrush, brush); - } - - SelectObject(hdc, old_bitmap); - DeleteDC(hdc); - ReleaseDC(NULL, hdc_screen); - CloseThemeData(theme); - return brush; -} - -/* Subclassing window procedure for theming dialogs in property sheet pages */ -static LRESULT CALLBACK PROPSHEET_ThemedSubclassProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, - UINT_PTR id, DWORD_PTR ref) -{ - POINT org, old_org; - LOGBRUSH logbrush; - WNDPROC dlgproc; - HBRUSH brush; - LRESULT lr; - RECT rect; - HDC hdc; - - switch (msg) - { - case WM_THEMECHANGED: - { - brush = GetPropW(hwnd, PropSheetPageBackgroundBrush); - if (brush) - { - RemovePropW(hwnd, PropSheetPageBackgroundBrush); - if (GetObjectW(brush, sizeof(logbrush), &logbrush) == sizeof(logbrush)) - DeleteObject((HBITMAP)logbrush.lbHatch); - DeleteObject(brush); - } - InvalidateRect(hwnd, NULL, TRUE); - break; - } - case WM_ERASEBKGND: - { - if (!IsThemeActive() || !IsThemeDialogTextureEnabled(hwnd)) - break; - - dlgproc = (WNDPROC)GetWindowLongPtrW(hwnd, DWLP_DLGPROC); - lr = CallWindowProcW(dlgproc, hwnd, msg, wp, lp); - if (lr) - return lr; - - brush = get_propsheet_background_brush(hwnd); - if (!brush) - break; - - /* Using FillRect() to draw background could introduce a tiling effect if the destination - * rectangle is larger than the pattern brush size, which is usually 10x600. This bug is - * visible on property sheet pages if system DPI is set to 192. However, the same bug also - * exists on XP and explains why vista+ don't use gradient tab body background anymore */ - hdc = (HDC)wp; - GetViewportOrgEx(hdc, &org); - SetBrushOrgEx(hdc, org.x, org.y, &old_org); - GetClientRect(hwnd, &rect); - FillRect(hdc, &rect, brush); - SetBrushOrgEx(hdc, old_org.x, old_org.y, NULL); - return TRUE; - } - - case WM_CTLCOLORSTATIC: - { - if (!IsThemeActive() || !IsThemeDialogTextureEnabled(hwnd)) - break; - - dlgproc = (WNDPROC)GetWindowLongPtrW(hwnd, DWLP_DLGPROC); - lr = CallWindowProcW(dlgproc, hwnd, msg, wp, lp); - if (lr) - return lr; - - brush = get_propsheet_background_brush(hwnd); - if (!brush) - break; - - hdc = (HDC)wp; - SetBkColor(hdc, GetSysColor(COLOR_BTNFACE)); - SetBkMode(hdc, TRANSPARENT); - - org.x = 0; - org.y = 0; - MapWindowPoints((HWND)lp, hwnd, &org, 1); - SetBrushOrgEx(hdc, -org.x, -org.y, NULL); - return (LRESULT)brush; - } - } - - return DefSubclassProc(hwnd, msg, wp, lp); -} - /* * Get the size of an in-memory Template * @@ -1599,10 +1467,6 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent, SetWindowSubclass(hwndPage, PROPSHEET_WizardSubclassProc, 1, (DWORD_PTR)ppshpage); } - else - { - SetWindowSubclass(hwndPage, PROPSHEET_ThemedSubclassProc, 1, (DWORD_PTR)ppshpage); - } if (!(psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD)) EnableThemeDialogTexture (hwndPage, ETDT_ENABLETAB); @@ -2487,8 +2351,6 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg, PropSheetInfo * psInfo = GetPropW(hwndDlg, PropSheetInfoStr); HWND hwndTabControl = GetDlgItem(hwndDlg, IDC_TABCONTROL); PropPageInfo* oldPages; - LOGBRUSH logbrush; - HBRUSH brush; TRACE("index %d, hpage %p\n", index, hpage); if (!psInfo) { @@ -2546,18 +2408,6 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg, RemoveWindowSubclass(psInfo->proppage[index].hwndPage, PROPSHEET_WizardSubclassProc, 1); } - else - { - RemoveWindowSubclass(psInfo->proppage[index].hwndPage, PROPSHEET_ThemedSubclassProc, 1); - brush = GetPropW(psInfo->proppage[index].hwndPage, PropSheetPageBackgroundBrush); - if (brush) - { - RemovePropW(psInfo->proppage[index].hwndPage, PropSheetPageBackgroundBrush); - if (GetObjectW(brush, sizeof(logbrush), &logbrush) == sizeof(logbrush)) - DeleteObject((HBITMAP)logbrush.lbHatch); - DeleteObject(brush); - } - } /* Destroy page dialog window */ DestroyWindow(psInfo->proppage[index].hwndPage); @@ -2855,8 +2705,6 @@ static int PROPSHEET_GetPageIndex(HPROPSHEETPAGE page, const PropSheetInfo* psIn */ static void PROPSHEET_CleanUp(HWND hwndDlg) { - LOGBRUSH logbrush; - HBRUSH brush; int i; PropSheetInfo* psInfo = RemovePropW(hwndDlg, PropSheetInfoStr); @@ -2877,18 +2725,6 @@ static void PROPSHEET_CleanUp(HWND hwndDlg) RemoveWindowSubclass(psInfo->proppage[i].hwndPage, PROPSHEET_WizardSubclassProc, 1); } - else - { - RemoveWindowSubclass(psInfo->proppage[i].hwndPage, PROPSHEET_ThemedSubclassProc, 1); - brush = GetPropW(psInfo->proppage[i].hwndPage, PropSheetPageBackgroundBrush); - if (brush) - { - RemovePropW(psInfo->proppage[i].hwndPage, PropSheetPageBackgroundBrush); - if (GetObjectW(brush, sizeof(logbrush), &logbrush) == sizeof(logbrush)) - DeleteObject((HBITMAP)logbrush.lbHatch); - DeleteObject(brush); - } - } if(psInfo->proppage[i].hwndPage) DestroyWindow(psInfo->proppage[i].hwndPage);
1
0
0
0
Zhiyi Zhang : comctl32/static: Enable parent dialog tab texture.
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: 9083b1e8b1888077c648a4dd8e908113700945a4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9083b1e8b1888077c648a4dd…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jan 24 15:47:33 2022 +0800 comctl32/static: Enable parent dialog tab texture. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/static.c | 9 +++++++++ dlls/uxtheme/tests/system.c | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c index 60af6696425..d584b470a8c 100644 --- a/dlls/comctl32/static.c +++ b/dlls/comctl32/static.c @@ -35,6 +35,7 @@ #include "wingdi.h" #include "winuser.h" #include "commctrl.h" +#include "uxtheme.h" #include "wine/heap.h" #include "wine/debug.h" @@ -432,12 +433,20 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, switch (uMsg) { case WM_CREATE: + { + HWND parent; + if (style < 0L || style > SS_TYPEMASK) { ERR("Unknown style 0x%02x\n", style ); return -1; } + + parent = GetParent( hwnd ); + if (parent) + EnableThemeDialogTexture( parent, ETDT_ENABLE ); break; + } case WM_NCDESTROY: if (style == SS_ICON) diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 32bf754e2f8..afc05b8549f 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -2097,7 +2097,6 @@ static void test_EnableThemeDialogTexture(void) child_hdc = GetDC(child); brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); if (class_tests[i].texture_enabled) - todo_wine_if(!lstrcmpA(class_tests[i].param.class_name, WC_STATICA)) ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture enabled.\n"); else ok(brush == GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture disabled.\n"); @@ -2121,7 +2120,6 @@ static void test_EnableThemeDialogTexture(void) child_hdc = GetDC(child); brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); if (class_tests[i].texture_enabled) - todo_wine_if(!lstrcmpA(class_tests[i].param.class_name, WC_STATICA)) ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture enabled.\n"); else ok(brush == GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture disabled.\n"); @@ -2142,7 +2140,6 @@ static void test_EnableThemeDialogTexture(void) NULL); ok(child != NULL, "CreateWindowA failed, error %d.\n", GetLastError()); ret = IsThemeDialogTextureEnabled(hwnd); - todo_wine ok(ret, "Wrong dialog texture status.\n"); /* Test that if you move the child control to another window, it doesn't enables tab texture for
1
0
0
0
Zhiyi Zhang : comctl32/button: Enable parent dialog tab texture.
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: c5ba5e2ecb0091fc2462ea183cf2ce6150f55813 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c5ba5e2ecb0091fc2462ea18…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jan 24 15:47:17 2022 +0800 comctl32/button: Enable parent dialog tab texture. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 8 ++++++++ dlls/uxtheme/tests/system.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 72c1a17402c..a2a1c9e0561 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -526,6 +526,9 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L break; case WM_CREATE: + { + HWND parent; + if (btn_type >= MAX_BTN_TYPE) return -1; /* abort */ @@ -537,7 +540,12 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L } infoPtr->state = BST_UNCHECKED; OpenThemeData( hWnd, WC_BUTTONW ); + + parent = GetParent( hWnd ); + if (parent) + EnableThemeDialogTexture( parent, ETDT_ENABLE ); return 0; + } case WM_DESTROY: theme = GetWindowTheme( hWnd ); diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 540cd7d2fcd..32bf754e2f8 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -2097,7 +2097,7 @@ static void test_EnableThemeDialogTexture(void) child_hdc = GetDC(child); brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); if (class_tests[i].texture_enabled) - todo_wine + todo_wine_if(!lstrcmpA(class_tests[i].param.class_name, WC_STATICA)) ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture enabled.\n"); else ok(brush == GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture disabled.\n"); @@ -2121,7 +2121,7 @@ static void test_EnableThemeDialogTexture(void) child_hdc = GetDC(child); brush = (HBRUSH)SendMessageW(dialog, WM_CTLCOLORSTATIC, (WPARAM)child_hdc, (LPARAM)child); if (class_tests[i].texture_enabled) - todo_wine + todo_wine_if(!lstrcmpA(class_tests[i].param.class_name, WC_STATICA)) ok(brush != GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture enabled.\n"); else ok(brush == GetSysColorBrush(COLOR_BTNFACE), "Expected tab texture disabled.\n");
1
0
0
0
Zhiyi Zhang : uxtheme: Hook DefDlgProc() for dialog theming.
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: b02405d799fafdc9830aafb9308416f710ad30f2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b02405d799fafdc9830aafb9…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jan 24 15:47:07 2022 +0800 uxtheme: Hook DefDlgProc() for dialog theming. Fix controls on OpenMPT's channel setting dialog having incorrect background. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/defdlg.c | 34 +++++++-- dlls/user32/hook.c | 1 + dlls/user32/user_private.h | 1 + dlls/uxtheme/Makefile.in | 1 + dlls/uxtheme/dialog.c | 176 ++++++++++++++++++++++++++++++++++++++++++++ dlls/uxtheme/system.c | 1 + dlls/uxtheme/tests/system.c | 20 +---- dlls/uxtheme/uxthemedll.h | 1 + include/winuser.h | 1 + 9 files changed, 210 insertions(+), 26 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=b02405d799fafdc9830a…
1
0
0
0
Zhiyi Zhang : uxtheme: Allow EnableThemeDialogTexture() to set flags in multiple steps.
by Alexandre Julliard
24 Jan '22
24 Jan '22
Module: wine Branch: master Commit: 3e467a133f83e4c851f49beff5602f5673ac806e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3e467a133f83e4c851f49bef…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jan 24 15:47:00 2022 +0800 uxtheme: Allow EnableThemeDialogTexture() to set flags in multiple steps. For example, set ETDT_USETABTEXTURE first and then set ETDT_ENABLE to activate dialog theming. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/uxtheme/draw.c | 28 +++++++++++++++++++++++----- dlls/uxtheme/tests/system.c | 8 ++------ 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index b6e5f0230e5..4aac46f3fed 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -52,14 +52,32 @@ extern ATOM atDialogThemeEnabled; /*********************************************************************** * EnableThemeDialogTexture (UXTHEME.@) */ -HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags) +HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD new_flag) { + DWORD old_flag = 0; BOOL res; - TRACE("(%p,0x%08x\n", hwnd, dwFlags); - res = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled), - UlongToHandle(dwFlags|0x80000000)); - /* 0x80000000 serves as a "flags set" flag */ + TRACE("(%p,%#x\n", hwnd, new_flag); + + new_flag &= ETDT_VALIDBITS; + + if (new_flag == 0) + return S_OK; + + if (new_flag & ETDT_DISABLE) + { + new_flag = ETDT_DISABLE; + old_flag = 0; + } + + if (new_flag & ~ETDT_DISABLE) + { + old_flag = HandleToUlong(GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled))); + old_flag &= ~ETDT_DISABLE; + } + + new_flag = new_flag | old_flag; + res = SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled), UlongToHandle(new_flag)); return res ? S_OK : HRESULT_FROM_WIN32(GetLastError()); } diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 93994fa8364..4a5a6d291fc 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -1645,16 +1645,15 @@ static void test_EnableThemeDialogTexture(void) { DWORD flag; BOOL enabled; - BOOL todo; } invalid_flag_tests[] = { - {0, FALSE, TRUE}, + {0, FALSE}, {ETDT_DISABLE | ETDT_ENABLE, FALSE}, {ETDT_ENABLETAB | ETDT_ENABLEAEROWIZARDTAB, TRUE}, {ETDT_USETABTEXTURE | ETDT_USEAEROWIZARDTABTEXTURE, TRUE}, {ETDT_VALIDBITS, FALSE}, - {~ETDT_VALIDBITS, FALSE, TRUE}, + {~ETDT_VALIDBITS, FALSE}, {~ETDT_VALIDBITS | ETDT_DISABLE, FALSE} }; @@ -1989,7 +1988,6 @@ static void test_EnableThemeDialogTexture(void) hr = EnableThemeDialogTexture(dialog, invalid_flag_tests[i].flag); ok(hr == S_OK, "EnableThemeDialogTexture failed, hr %#x.\n", hr); ret = IsThemeDialogTextureEnabled(dialog); - todo_wine_if(invalid_flag_tests[i].todo) ok(ret == invalid_flag_tests[i].enabled, "Wrong dialog texture status.\n"); EndDialog(dialog, 0); @@ -2020,7 +2018,6 @@ static void test_EnableThemeDialogTexture(void) "EnableThemeDialogTexture first flag", FALSE); ret = IsThemeDialogTextureEnabled(dialog); /* Non-zero flags without ETDT_DISABLE enables dialog texture */ - todo_wine_if(flags[i] == 0) ok(ret == (!(flags[i] & ETDT_DISABLE) && flags[i]), "Wrong dialog texture status.\n"); child = GetDlgItem(dialog, 100); @@ -2045,7 +2042,6 @@ static void test_EnableThemeDialogTexture(void) if (flags[j]) ok(ret == !(flags[j] & ETDT_DISABLE), "Wrong dialog texture status.\n"); else - todo_wine_if(!flags[i] || flags[i] == ETDT_DISABLE || flags[i] == (ETDT_DISABLE | ETDT_ENABLE)) ok(ret == (!(flags[i] & ETDT_DISABLE) && flags[i]), "Wrong dialog texture status.\n"); lr = SendMessageA(dialog, WM_ERASEBKGND, (WPARAM)child_hdc, 0); ok(lr != 0, "WM_ERASEBKGND failed.\n");
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
73
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
Results per page:
10
25
50
100
200